It’s a common pattern, an enterprise software solution has a body of code, managed by version control, verified by continuous integration and eventually delivered to some deployment system. If that were the whole picture things would be relatively straightforward. Tests pass? deploy it!
Unfortunately there is often also a database in the mix. This complicates things. Decisions about how many databases to use in the development process, how to ensure that development workspaces, test systems, and live deployments always use an appropriate database, and how to ensure that database changes and code changes don’t break each other occupy an increasing amount of time and energy.
Tom Czarniecki discusses one path through some of these issues. His suggestions do introduce some potential extra complexity in the code, though.
Zero-downtime deployments « No One Is Perfect.