Skip to content

Instantly share code, notes, and snippets.

@jasonbeverage
Created April 28, 2014 12:49
Show Gist options
  • Save jasonbeverage/11370879 to your computer and use it in GitHub Desktop.
Save jasonbeverage/11370879 to your computer and use it in GitHub Desktop.
How to reset South migrations
# 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