mirror of
https://github.com/etesync/server
synced 2024-11-29 20:18:07 +00:00
23 lines
520 B
Python
23 lines
520 B
Python
|
# Generated by Django 3.1.1 on 2020-12-14 11:24
|
||
|
|
||
|
from django.db import migrations
|
||
|
|
||
|
|
||
|
def update_collection_uid(apps, schema_editor):
|
||
|
Collection = apps.get_model("django_etebase", "Collection")
|
||
|
|
||
|
for collection in Collection.objects.all():
|
||
|
collection.uid = collection.main_item.uid
|
||
|
collection.save()
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
("django_etebase", "0033_collection_uid"),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(update_collection_uid),
|
||
|
]
|