You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
etesync-server/django_etesync/migrations/0037_auto_20200415_1421.py

24 lines
693 B

# Generated by Django 3.0.3 on 2020-04-15 14:21
from django.db import migrations
def change_chunk_relation(apps, schema_editor):
CollectionItemRevision = apps.get_model('django_etesync', 'CollectionItemRevision')
RevisionChunkRelation = apps.get_model('django_etesync', 'RevisionChunkRelation')
for revision in CollectionItemRevision.objects.all():
for chunk in revision.chunks.all():
RevisionChunkRelation.objects.create(chunk=chunk, revision=revision)
class Migration(migrations.Migration):
dependencies = [
('django_etesync', '0036_auto_20200415_1420'),
]
operations = [
migrations.RunPython(change_chunk_relation),
]