# Generated by Django 3.1.8 on 2021-05-10 18:21

import django.contrib.postgres.fields
from django.db import migrations, models


def update_all_light_touch_reviews(apps, schema_editor):
    PublicBarrierLightTouchReviews = apps.get_model(
        "barriers", "PublicBarrierLightTouchReviews"
    )
    for light_touch_reviews_instance in PublicBarrierLightTouchReviews.objects.all():
        light_touch_reviews_instance.save()


class Migration(migrations.Migration):

    dependencies = [
        ("barriers", "0107_auto_20210427_1213_squashed_0111_auto_20210504_1439"),
    ]

    operations = [
        migrations.AddField(
            model_name="publicbarrierlighttouchreviews",
            name="missing_government_organisation_approvals",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.IntegerField(blank=True),
                blank=True,
                default=list,
                size=None,
            ),
        ),
        migrations.RunPython(update_all_light_touch_reviews),
    ]
