Re:Ask HN: Patterns for deploying webapp updates with no dow...
by mpfefferle on Wednesday April 14, 2010 @02:14PM
(#1265640)
This may not be a perfectly generalized solution, but is it possible to structure your system such that when upgrading from version i to version i+1, version i of your app is compatible with both versions i and i+1 of your database and vice versa?
Say, for example, your factoring a column into it's own table. Don't just drop the column, set up a trigger to synchronize the original column value with a value from one of the rows in your new table.
You could then finally drop the column in version i+2.
I seem to remember finding a book on database refactorings that covered this technique in more detail. It was online so you could try Googling for it.
The big challenge is making changes to the database schema and co-ordinating the deployment of those changes with the switch over of traffic to the new application logic.