2020-08-04 12:19:45 +00:00
|
|
|
# Generated by Django 3.0.3 on 2020-08-04 12:09
|
|
|
|
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
|
|
|
|
|
|
def change_chunk_to_collections(apps, schema_editor):
|
2020-11-14 15:04:41 +00:00
|
|
|
CollectionItemChunk = apps.get_model("django_etebase", "CollectionItemChunk")
|
2020-08-04 12:19:45 +00:00
|
|
|
|
|
|
|
for chunk in CollectionItemChunk.objects.all():
|
|
|
|
chunk.collection = chunk.item.collection
|
|
|
|
chunk.save()
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2020-11-14 15:04:41 +00:00
|
|
|
("django_etebase", "0023_collectionitemchunk_collection"),
|
2020-08-04 12:19:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.RunPython(change_chunk_to_collections),
|
|
|
|
]
|