# Generated by Django 2.1.7 on 2019-04-02 07:09

from django.db import migrations, models
import uuid


def gen_uuid(apps, schema_editor):
    GovernmentProject = apps.get_model('govproject', 'GovernmentProject')
    for row in GovernmentProject.objects.all():
        row.slug = uuid.uuid4()
        row.save(update_fields=['slug'])


class Migration(migrations.Migration):

    dependencies = [
        ('govproject', '0004_auto_20190402_0628'),
    ]

    operations = [
        migrations.AddField(
            model_name='governmentproject',
            name='slug',
            field=models.UUIDField(default=uuid.uuid4, editable=False, null=True),
        ),
        migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop),
        migrations.AlterField(
            model_name="governmentproject",
            name="slug",
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
    ]
