Created
August 4, 2013 00:21
-
-
Save philangist/6148522 to your computer and use it in GitHub Desktop.
Reset db to fix any migration inconsistencies in Django
This file contains 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
#delete all migrations and reset models.py to initial state | |
rm -r app/migrations/ | |
chmod +x manage.py | |
./manage.py flush | |
./manage.py schemamigration app --initial | |
./manage.py migrate app --fake | |
#after changing models.py | |
./manage.py schemamigration app --auto | |
./manage.py migrate app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment