Closed Bug 700892 Opened 13 years ago Closed 13 years ago

[mozillians-dev|stage|prod] Run south migrations on update

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

All
Other
task
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davedash, Assigned: oremj)

References

Details

Hi we're starting to use Django-South to manage migrations instead of schematic. So we can take out schematic migrations from our updates and add: ./manage.py syncdb ./manage.py migrate This needs to happen on dev/stage and prod.
Assignee: server-ops → oremj
Is it okay to run that in prod at any time?
oremj - it should do nothing significant at the moment, but when we do push, it will be okay to run at any time, south will NOOP unless there's migrations.
Blocks: 700838
Blocks: 699593
For what it's worth, I ran this on the dev server and got the following: Running migrations for users: - Migrating forwards to 0002_auto__add_field_userprofile_is_vouched__add_field_userprofile_vouched_. > users:0001_initial ! Error found during real run of migration! Aborting. ! Since you have a database that does not support running ! schema-altering statements in transactions, we have had ! to leave it in an interim state between migrations. ! You *might* be able to recover with: = DROP TABLE `profile` CASCADE; [] = DROP TABLE `profile_groups` CASCADE; [] ! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS. ! NOTE: The error which caused the migration to fail is further up. That is not good.
To avoid the error: INSERT INTO `south_migrationhistory` (`id`, `app_name`, `migration`, `applied`) VALUES (1, 'users', '0001_initial', '2011-11-09 02:41:21');
This has been run on dev/stage. The prod part should just be added to the push instructions.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Just making sure: this has been added to the deploy script, right? These commands replace our old schematic commands, so they'll need to be run on every deploy.
Updated scripts to reflect changes.
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.