Created
February 25, 2013 08:48
-
-
Save cyeong/5028551 to your computer and use it in GitHub Desktop.
migration problem
This file contains hidden or 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
| 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