Add migration to custom document model
This commit is contained in:
parent
ea67b8b64c
commit
78abe81f8f
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
from books.migrate_document_model import migrate_documents_to_custom_document_model
|
||||||
|
|
||||||
|
|
||||||
|
def forwards_func(apps, schema_editor):
|
||||||
|
migrate_documents_to_custom_document_model()
|
||||||
|
|
||||||
|
|
||||||
|
def reverse_func(apps, schema_editor):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
('books', '0035_auto_20220728_0848'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(forwards_func, reverse_func),
|
||||||
|
]
|
||||||
Loading…
Reference in New Issue