Re:Why we don't schedule deployments during off-hours
by sokoloff on Monday October 25, 2010 @11:34AM
(#1830215)
If you release the new code only after the DB changes are complete, the new code doesn't need to be backwards compatible.
The above guidelines are designed to provide no-change to the queries the old code is running, so that should be possible to accomplish for 95+% of your migrations.
For truly long-running migrations (longer than you're willing to wait to push code), you're correct that the new code must handle both cases. In our case, that's extremely rarely a factor, but we also don't push on every commit (nor even every day) like some shops do.
That imposes an additional constraint - the new code needs to be backwards compatible (while any data migration scripts are running), and - in a clustered environment - it needs to be able to deal with the case where old and new code bases and databases are available and running simultaneously.