Created
April 28, 2014 12:49
-
-
Save jasonbeverage/11370879 to your computer and use it in GitHub Desktop.
How to reset South migrations
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
# From http://stackoverflow.com/questions/12822584/how-to-reset-south-migrations-to-capture-the-current-state-of-my-django-models/12823039#12823039 | |
# I figured this out (wasn't too bad). To set up the migration reset, I do the following: | |
rm <app-dir>/migrations/* | |
python manage.py schemamigration <app-name> --initial | |
python manage.py migrate <app-name> 0001 --fake --delete-ghost-migrations | |
# I commit the changes to the repository, and then for each deployment of the code elsewhere, run: | |
python manage.py migrate <app-name> 0001 --fake --delete-ghost-migrations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment