import uuid

# Generated by Django 3.2.7 on 2022-05-13 19:09
from django.db import migrations


def gen_uuid(apps, schema_editor):
    Material = apps.get_model("uploaded_material", "Material")
    for material in Material.objects.all():
        material.uuid = uuid.uuid4()
        material.save(update_fields=["uuid"])


class Migration(migrations.Migration):

    dependencies = [
        ("uploaded_material", "0007_material_uuid"),
    ]

    operations = [
        migrations.RunPython(gen_uuid, migrations.RunPython.noop),
    ]
