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), ]