# Generated by Django 3.0.4 on 2020-04-11 07:17

import uuid
from django.db import migrations, models


def create_uuids(apps, schema_editor):
    Region = apps.get_model('apartments_analyzer', 'CityRegion')
    for region in Region.objects.all():
        region.uuid = uuid.uuid4()
        region.save()


class Migration(migrations.Migration):

    dependencies = [
        ('apartments_analyzer', '0034_auto_20200405_2036'),
    ]

    operations = [
        migrations.AddField(
            model_name='cityregion',
            name='uuid',
            field=models.UUIDField(blank=True, null=True, default=uuid.uuid4),
        ),
        migrations.RunPython(create_uuids),
        migrations.AlterField(
            model_name='cityregion',
            name='uuid',
            field=models.UUIDField(unique=True, default=uuid.uuid4),
        )
    ]
