Skip to content

Instantly share code, notes, and snippets.

@cyeong
Created February 25, 2013 08:48
Show Gist options
  • Save cyeong/5028551 to your computer and use it in GitHub Desktop.
Save cyeong/5028551 to your computer and use it in GitHub Desktop.
migration problem
if there's a migration problem and you could not rollback nor advance the migration, try doing this
All the migrations, that have previously been triggered are stored in the database in a table called south_migrationhistory.
The migrations that are saved inside this table are not going to be triggered anymore. So if you want to run them again, you have to delete their records from that table.
If you're using MySQL this can be done through PhpMyAdmin, if using PgSQL, through PgAdmin III. You can also do this through the Django Project management shell.
python manage.py shell
from south.models import MigrationHistory
m = MigrationHistory.objects.get(migration="<migration_name>")
m.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment