|
I accidentally executed:
Now I want to do actual migration. But when I run "manage.py migrate forum" I get message "nothing to migrate". When I run "manage.py migrate forum --all" I get:
How to redo migration? BTW: I'm trying to migrate from beta1 to beta3. |
|
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.
If you're migrating between OSQA Fantasy Island Beta2 and Beta3 you'll probably have to take into consideration the migrations between 0043 and 0048. Thank you very much. Could you tell me how can I find out which migrations in the table was created as "fake"?
(24 Mar '11, 07:51)
Shrike
Probably I should clarify. I had beta 1 installed. Then moved to beta 3 and executed "migrate --fake". That didn't change my DB but created some rows in south_migrarionhistory. Now I want to rollback to beta1. Now to find out for sure which rows in south_migrationhistory should I delete? You said "probably between 43-48", ok, but I'd like to have a generic method for rolling back.
(24 Mar '11, 16:46)
Shrike
1
@Shrike, take a look at the folder forum/migrations. Based on the timestamps of the files, you can figure which migrations showed up only after the upgrade. Then just delete the corresponding records, either directly in the database, or using the method Jordan described.
(24 Mar '11, 16:50)
Hernani Cerq... ♦♦
If you executed the migrations with a "--fake" parameter you'll just have to remove the items from the migration history table. It's not a good idea to use the "backwards" methods of the migrations. After that a simple update of the code to the revision of the Beta2 Release would be enough. svn update -r 736 (736 is the revision # of Fantasy Island Beta 2)
(24 Mar '11, 16:58)
Jordan ♦♦
Thanks! By comparing two distributives I've found all migrations and successfully delete them. BTW: they are 45-48
(24 Mar '11, 17:27)
Shrike
|
|
when input
then
|