# Generated by Django 2.2.5 on 2019-10-31 10:59

from django.db import migrations


def copy_subvention_rate(apps, schema_editor):
    Aid = apps.get_model("aids", "Aid")
    aids = Aid.objects.filter(subvention_rate__isnull=False)
    for aid in aids:
        aid.subvention_rate_range = (None, int(aid.subvention_rate))
        aid.save()


class Migration(migrations.Migration):

    dependencies = [
        ("aids", "0077_aid_subvention_rate_range"),
    ]

    operations = [migrations.RunPython(copy_subvention_rate)]
