# Generated by Django 2.2.16 on 2020-10-30 20:47

from django.db import migrations, models


def postgres_migration_prep(apps, schema_editor):
    Content = apps.get_model("pages", "Content")
    fields = ("title",)

    for field in fields:
        filter_param = {"{}__isnull".format(field): True}
        update_param = {field: ""}
        Content.objects.filter(**filter_param).update(**update_param)


class Migration(migrations.Migration):

    dependencies = [
        ("pages", "0001_initial"),
    ]

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