When you have screwed your south migrations
It is easiest to start over.
1 Delete all migrations/* files.
2 Remove the changes in models.py which I want to migrate at the moment (by the help of version control tools, or just comment out your new fields).
3 Then initialize migration from scratch.
manage.py migrate my_app --delete-ghost-migrations
manage.py schemamigration my_app --init
manage.py migrate my_app --fake
4 Then restore my changes to models.py and begin new clean migration:
manage.py schemamigration my_app --auto
manage.py migrate my_app
Written by Skate Hunbash
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#