# Generated by Django 4.2.13 on 2024-11-12 14:39

import uuid

from django.db import migrations, models


def create_uuid(apps, schema_editor):
    RoleExpiration = apps.get_model("rbaca", "RoleExpiration")
    for re in RoleExpiration.objects.all():
        re.uuid = uuid.uuid4()
        re.save()


class Migration(migrations.Migration):

    dependencies = [
        ("rbaca", "0001_initial"),
    ]

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