Patrick Lightbody, founder of HostedQA and co-founder of WebWork 2 thinks that all enterprise apps should include an upgrade framework on their projects to manage changes between versions. A framework that combines both code and SQL to change schemas and migrate data is needed, because simple SQL scripts are not enough and Hibernate's schema update utilities "take you from step A to Z without giving you an opportunity to make iterative changes to the data."
To really make software easy to deploy, you need to streamline the upgrade process to be trivial while also automating upgrades from any arbitrary version to any other arbitrary version.
Further commenting on the benefits, Pat cites the familiar example of a developer sending out an email to the team with info on how to update their DB before running the latest checked in code.
If your team had an upgrade framework, "Bob" wouldn't have to send out an email and depend on each team member reading the email and correctly executing his recommended steps. In short: it eliminates room for human error during development.Pat also provided some advice on how to best implement an upgrade framework:
- Don't depend on your O/R framework
- Don't depend on any of your application code, just stick to plain JDBC