Running database migrations with FluentMigrator
INFO
This documentation is for FAKE.exe before version 5 (or the non-netcore version). The documentation needs to be updated, please help!
FluentMigrator is a .NET library which helps to version database schema using incremental migrations which are described in C#. The basic idea of the FAKE helper is to run FluentMigrator over the existing database using compiled assembly with migrations.
Migrating your database to the latest version
FAKE's support for FluentMigrator ships with a separate NuGet package called FAKE.FluentMigrator. Usually your FAKE setup will look as follows:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: |
|
ConnectionStrings
Specify connection string in build script:
1:
|
|
Use connection string from config file:
1:
|
|
Providers / drivers / SQL dialects
The following drivers are supported:
- SqlServer (SqlServerVersion.Default, V2000, V2005, V2008, V2012, V2014)
- SqlServer (CE)
- Oracle (OracleVersion.Default, Managed, DotConnect)
- DB2
- Firebird
- HANA
- Jet
- MySql
- PostgreSQL
- SQLite
Available commands
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: |
|
Advanced usage
For advanced usage see the source code.
val assembly : string
val connection : obj
val options : obj