# Generated by Django 2.2.19 on 2021-03-15 10:44

from django.db import migrations


def disallow_contact(apps, schema_editor):
    Proposal = apps.get_model("meinberlin_budgeting", "Proposal")

    for proposal in Proposal.objects.all():
        proposal.allow_contact = False
        proposal.save()


def allow_contact(apps, schema_editor):
    Proposal = apps.get_model("meinberlin_budgeting", "Proposal")

    for proposal in Proposal.objects.all():
        proposal.allow_contact = True
        proposal.save()


class Migration(migrations.Migration):

    dependencies = [
        ("meinberlin_budgeting", "0022_add_contact_fields"),
    ]

    operations = [
        migrations.RunPython(disallow_contact, allow_contact),
    ]
