How it works?

Paul Stovell has a great blog post on How to deploy a database and we fully agree with the concepts behind database deployment and highly suggest reading the post.

Database migrations is the core concept of DB Version Control. Instead of writing the change script manually, the tool generates the scripts automatically depending on the selected changes.

In addition to migrations, DB Version Control scripts database objects and static data into files so that they would be versioned in the same way as source code files - this allows keeping track of individual database objects changes (who changed what and when).

When changes are made to the database, DB Version Control compares the database with source files (by creating a temporary database for faster comparison) and displays the differences. A user chooses the changes to apply - the changes are scripted as a migration script as well as individual database objects are scripted into files. The files can be versioned with any version control system (SVN, GIT, TFS, etc.).

To move changes between environments (e.g. DEVELOPMENT to TEST, TEST to PROD), use version control systems in the same way as source code is moved (using merge commands).

Execute migration scripts during deployment to other environments using Migration runner.