-
Notifications
You must be signed in to change notification settings - Fork 679
fix bug 1084003 - repair migrations after attachment split #2850
Conversation
This moves back three of the original wiki migrations into the wiki app and adds a new initial migration to the attachments app that renames the tables. It also backfills the south history table to remember those three migrations (since they are still effectively applied). The wiki app has a new empty migration that only depends on the last migration of the attachements app, so that migrating the wiki app will run the attachements app migration first. This also gets rid of old schematic migrations that have been applied before by running the schematic command. Some new South migrations were added as the result of that (as replacements): - a new data migration in the devmo app that tries to create a default site object. - an initial and a data migration for the feeder app (both faked during deploy) The migration in the users app that deleted the old and unneeded user profile related tables is not handled by exception catching, for initial setups of an empty database. The script that is run on the dev server during deploy has been modified to run the appropriate migrate command to reset the database there. The chief deploy script has been modified to *only* run the appropriate migrations when the deployed git tag is "attachments-split-cleanup" since chief runs the script from disk, not after it has pulled from git. The puppet manifests have *not* been updated and instead migration steps will be provided via email to the users with a current develoment environment. The steps are: python2.6 vendor/src/schematic/schematic migrations/ python2.6 manage.py migrate feeder --delete-ghost-migrations --fake --noinput python2.6 manage.py migrate wiki --noinput python2.6 manage.py migrate --noinput
When I switched my existing dev environment to the branch, I tried the first step:
|
I tried adding
to
So I'm not sure what to try next? |
@groovecoder Huh, that's literally the command we run in all scripts, the file in question that schematic tries to load is |
The error happens on master too, so at least we know this PR didn't break it. I'm going to dig a bit more ... |
Okay, I did |
Brand new vm works too. @ubernostrum r? |
ping @ubernostrum can you get to this today before it starts to rot? |
Looking at it now that I have a functioning repo again. |
This looks good for me when trying both with my existing setup and with a fresh one. |
Marking not ready until we get demo studio stuff thru. Then we'll come back to this for merge + push. |
fix bug 1084003 - repair migrations after attachment split
This moves back three of the original wiki migrations into the wiki app and adds a new initial migration to the attachments app that renames the tables.
It also backfills the south history table to remember those three migrations (since they are still effectively applied).
The wiki app has a new empty migration that only depends on the last migration of the attachements app, so that migrating the wiki app will run the attachements app migration first.
This also gets rid of old schematic migrations that have been applied before by running the schematic command.
Some new South migrations were added as the result of that (as replacements):
The migration in the users app that deleted the old and unneeded user profile related tables is not handled by exception catching, for initial setups of an empty database.
The script that is run on the dev server during deploy has been modified to run the appropriate migrate command to reset the database there.
The chief deploy script has been modified to only run the appropriate migrations when the deployed git tag is "attachments-split-cleanup" since chief runs the script from disk, not after it has pulled from git.
The puppet manifests have not been updated and instead migration steps will be provided via email to the users with a current develoment environment. The steps are: