Created
June 6, 2019 12:10
-
-
Save ilya-muhortov/5ddd137032b57316ca7e4a1be5379a98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def migrate_code(apps, schema_editor): | |
Model = apps.get_model('App', 'ModelName') | |
def reverse_code(apps, schema_editor): | |
return | |
class Migration(migrations.Migration): | |
dependencies = [ | |
] | |
operations = [ | |
migrations.RunPython(migrate_code, reverse_code=reverse_code) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment