24 lines
483 B
Python
24 lines
483 B
Python
# Generated by Django 3.0.3 on 2020-02-22 15:13
|
|
|
|
import uuid
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def gen_uuid(apps, schema_editor):
|
|
MyModel = apps.get_model("program", "EventInstance")
|
|
for row in MyModel.objects.all():
|
|
row.uuid = uuid.uuid4()
|
|
row.save(update_fields=["uuid"])
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("program", "0080_auto_20200222_1547"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(gen_uuid),
|
|
]
|