I have just released DbVerse, an open source solution to the problem of database change management in software development.
Let me describe the problem that DbVerse seeks to solve:
Your team has gotten a good start developing a new application. Like most business applications, yours uses a relational database for persistence. You’ve partially defined the database schema. Each developer has a copy of the dev database on their local machine. Things are humming along nicely. Then Sally adds a new feature which requires adding a column to the Orders table. How do you get that change applied to all other developer machines, your CI server and your QA server all in lockstep with the code that depends on that change? Before you’re done dealing with Sally’s change, Jim adds an record to the OrderTypes lookup table. The code will break without it.
So you have struggled through development by emailing change scripts here and there. Or perhaps you periodically replace every instance of the database with a master copy that is kept in the source code repository. You are not too bothered by the fact that once you week or so you chase your tale for an hour because your local database is missing some recent change. You’re also not too worried that 20% of your integration tests no longer pass because they are never run on the CI server. But now you have gone into production. Version 1 of the database is deployed and is piling up production data. Development continues. By what process will you apply new schema changes to production? How will you keep track of which changes go with the new version you’re about to deploy? How will you be certain they have not yet been applied?
DbVerse provides a system to manage this whole process. Developers author database changes in .NET code or SQL scripts. These changes are versioned with rest of the source code and thus immediately available to the entire development team. Developer and CI databases can be automatically rebuilt to match the current code from a command line (and therefore a build script) or via a Windows UI. Likewise QA and production databases can be automatically updated with only new changes via command line or via a Windows UI.
Under the hood, DbVerse uses SQL Management Objects (SMO) for authoring changes in code. Therefore it is targeted at SQL Server based applications. DbVerse uses a project template for easy setup, which creates a C# project. It would be possible to use DbVerse with Visual Basic, but this has not been tested.