Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

FluentMigratorHelper

Contains functions to run FluentMigrator

Nested types and modules

TypeDescription
DatabaseConnection

Database connection configuration

DatabaseProvider

Fluent Migrator SQL syntax provider

DatabaseTask

Database operation to execute

MigrationOptions

Fluent Migrator options

MigrationRunningMode

Fluent Migrator execution mode

OracleVersion

Oracle database driver version

SqlServerVersion

MS SQL Server driver version

Functions and values

Function or valueDescription
DefaultMigrationOptions
Signature: MigrationOptions

Default migration options

ExecuteDatabaseTask(...)
Signature: task:DatabaseTask -> assemblies:seq<string> -> options:MigrationOptions -> unit

Executes the specified task using configuration options

Parameters

  • task - Database task to execute
  • assemblies - Assembly files which contain migrations
  • options - Migration options which are passed to FluentMigrator
ListAppliedMigrations(...)
Signature: connection:DatabaseConnection -> assemblies:seq<string> -> unit

Lists all migrations which were applied to the database - connection - Database connection - assemblies - Assembly files which contain migrations

MigrateDown(...)
Signature: version:int64 -> connection:DatabaseConnection -> assemblies:seq<string> -> options:MigrationOptions -> unit

Migrates database up to the specified version

Parameters

  • version - Target version
  • connection - Database connection
  • assemblies - Assembly files which contain migrations
  • options - Migration options which are passed to FluentMigrator
MigrateToLatest(...)
Signature: connection:DatabaseConnection -> assemblies:seq<string> -> options:MigrationOptions -> unit

Migrates database up to the latest version

Parameters

  • connection - Database connection
  • assemblies - Assembly files which contain migrations
  • options - Migration options which are passed to FluentMigrator
MigrateUp(...)
Signature: version:int64 -> connection:DatabaseConnection -> assemblies:seq<string> -> options:MigrationOptions -> unit

Migrates database up to the specified version

Parameters

  • version - Target version
  • connection - Database connection
  • assemblies - Assembly files which contain migrations
  • options - Migration options which are passed to FluentMigrator
Rollback(...)
Signature: steps:int -> connection:DatabaseConnection -> assemblies:seq<string> -> options:MigrationOptions -> unit

Rollbacks several applied migrations

Parameters

  • steps - Number of migrations to rollback
  • connection - Database connection
  • assemblies - Assembly files which contain migrations
  • options - Migration options which are passed to FluentMigrator
RollbackLatest(...)
Signature: connection:DatabaseConnection -> assemblies:seq<string> -> options:MigrationOptions -> unit

Rollbacks latest applied migration - connection - Database connection - assemblies - Assembly files which contain migrations - options - Migration options which are passed to FluentMigrator