# Generated by Django 2.2.28 on 2022-08-18 13:42

import uuid

from django.db import migrations, models


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


class Migration(migrations.Migration):
    dependencies = [
        ('core', '0022_make_last_update_automatic'),
    ]

    operations = [
        migrations.AddField(
            model_name='userprofile',
            name='uuid',
            field=models.UUIDField(null=True, editable=False, unique=True),
        ),

        migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop)
    ]
