There are two types of projects I am involved in these days.
- Custom enterprise applications where we design the database and manage it.
- Web applications, that we host, where each customer has his own copy of the database.
In both cases there are many copies of the database installed.
- Developer databases
- Test database (both internal and customer)
- Production database
It is obvious that these databases should be under some Version Control so that can be easily synchronized.
Usually when a database is upgraded, a new version of the application is issued. If only one application is using the database then application-database sync is easy.
When multiple applications are using the same database then this problem is quite difficult to solve.
This is my solution to database versioning problem: