# Generated by Django 3.1.8 on 2021-06-15 01:52

from django.db import migrations, models
import uuid


def set_offline_id_field(apps, schema_editor):
    model = apps.get_model("aims", "ContactInfo")

    for instance in model.objects.all():
        instance.uuid = uuid.uuid4()
        instance.save()


class Migration(migrations.Migration):

    dependencies = [
        ('aims', '0089_simpleresultindicator'),
    ]

    operations = [
        migrations.AddField(
            model_name='contactinfo',
            name='uuid',
            field=models.UUIDField(blank=True, default=uuid.uuid4, null=True),
        ),
        migrations.RunPython(set_offline_id_field, lambda ags, kwargs: None),
        migrations.AlterField(
            model_name="contactinfo",
            name="uuid",
            field=models.UUIDField(blank=True, default=uuid.uuid4, unique=True, editable=False, null=True),
        ),
    ]
