In Chapter 4, TeamCity for Java Projects, we had an introduction to database migrations and also looked at the flyway tool to manage database migrations.
There are multiple database migration tools available for .NET that follow different approaches towards database migrations.
dbdeploy.net
is based on the dbdeploy
data migration tool for Java; dbdeploy
and dbdeploy.net
follow the concept of using SQL-based migrations. It is better to avoid this tool because there are multiple forks of this tool with varying features that have generally not been well maintained.
Tip
Even database migration tools based on Java/JVM, such as dbdeploy
and flyway, can be used with .NET projects too, but using a .NET-based one means an additional dependency on something like the JVM is removed.
FluentMigrator (https://github.com/schambers/fluentmigrator/wiki) is another database migration tool. With FluentMigrator, we use C# to write the migrations, rather than SQL. A sample FluentMigrator...