Merge lp://staging/~elachuni/rnr-server/null-reviewmoderationflag-user into lp://staging/rnr-server
Status: | Merged |
---|---|
Approved by: | Michael Nelson |
Approved revision: | 167 |
Merged at revision: | 167 |
Proposed branch: | lp://staging/~elachuni/rnr-server/null-reviewmoderationflag-user |
Merge into: | lp://staging/rnr-server |
Diff against target: |
162 lines (+158/-0) 1 file modified
src/reviewsapp/migrations/0009_null_reviewmoderationflag_user.py (+158/-0) |
To merge this branch: | bzr merge lp://staging/~elachuni/rnr-server/null-reviewmoderationflag-user |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | Approve | ||
Review via email:
|
Commit message
Add a migration to bring our migrated DB in sync with our models.
Description of the change
Overview
========
A branch with a single migration to bring our migrated DB in sync with our models. It seems in migration 0003 ReviewModeratio
Details
=======
The change should be idempotent when applying forward, so there should be no problem applying the change at this point. Migrating backwards will not work once we have rows with null users.
As for testing, as all migrations this will need to be tested manually on the daily box until we've got automatic migration test infrastructure in place. I've inspected the resulting schema locally and it looks right.
Looks good (I wasn't familiar with the to: syntax). I'll trust that you've checked the resulting schema.
15:50 < noodles> achuni: won't the backwards migration work just fine (as it'll update 'back' to null=True?) nflag objects
15:51 < achuni> noodles: ah hm
15:51 < achuni> hmmm
15:51 < noodles> (I assume south is just using the orm spec from the previous migration right?)
15:52 < achuni> noodles: you're right, the signature in the backwards method is just a guessed comment, it'll migrate "back" to the frozen state from the previous migration
15:52 < achuni> noodles: so actually the migration that will break when migrating backwards is 0003, if we have null users in reviewmoderatio
15:53 < noodles> Yep.