You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
564 B
Python
23 lines
564 B
Python
4 years ago
|
# 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):
|
||
4 years ago
|
CollectionItemChunk = apps.get_model("django_etebase", "CollectionItemChunk")
|
||
4 years ago
|
|
||
|
for chunk in CollectionItemChunk.objects.all():
|
||
|
chunk.collection = chunk.item.collection
|
||
|
chunk.save()
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
4 years ago
|
("django_etebase", "0023_collectionitemchunk_collection"),
|
||
4 years ago
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(change_chunk_to_collections),
|
||
|
]
|