# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-01 11:03
from django.db import migrations
from django.db.models import F


def forwards_func(apps, schema_editor):
    Page = apps.get_model("wagtailcore", "Page")
    Page.objects.filter(has_unpublished_changes=False).update(last_published_at=F('latest_revision_created_at'))


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0035_page_last_published_at'),
    ]

    operations = [
        migrations.RunPython(forwards_func, migrations.RunPython.noop),
    ]
