# Generated by Django 2.0.13 on 2019-04-05 12:13

from django.conf import settings
from django.db import migrations

def forward(apps, schema_editor):
    ContentType = apps.get_model("contenttypes", "ContentType")
    if ContentType._default_manager.filter(app_label="ocyan_plugin_wagtail_content_page").exists():
        ContentType._default_manager.filter(app_label="wagtail_content_page").delete()
        ContentType._default_manager.filter(app_label="ocyan_plugin_wagtail_content_page").update(app_label="wagtail_content_page")

def back(apps, schema_editor):
    pass


class Migration(migrations.Migration):
    atomic = False
    dependencies = [
        ('wagtailredirects', '0006_redirect_increase_max_length'),
        ('wagtailsearchpromotions', '0002_capitalizeverbose'),
        ('wagtailcore', '0041_group_collection_permissions_verbose_name_plural'),
        ('wagtailforms', '0003_capitalizeverbose'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ocyan_plugin_wagtail', '0008_auto_20180907_0932'),
        ('wagtailimages', '0001_squashed_0021'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('wagtail_content_page', '0002_product_add_to_cart'),
    ]

    operations = [
        migrations.RunPython(forward, back),
        migrations.AlterModelTable(
            name='contentpage',
            table=None,
        ),
    ]
