Interface IMigrationRunner
The migration runner
Inherited Members
Namespace: FluentMigrator.Runner
Assembly: FluentMigrator.Runner.dll
Syntax
public interface IMigrationRunner : IMigrationScopeStarter
Properties
| Improve this Doc View SourceMigrationAssemblies
Gets the assemblies searched for migrations, profile migrations, etc...
Declaration
IAssemblyCollection MigrationAssemblies { get; }
Property Value
Type | Description |
---|---|
IAssemblyCollection |
MigrationLoader
Gets or sets the migration loader to be used by this migration runner
Declaration
IMigrationInformationLoader MigrationLoader { get; }
Property Value
Type | Description |
---|---|
IMigrationInformationLoader |
Processor
Gets the migration processor used by this runner
Declaration
IMigrationProcessor Processor { get; }
Property Value
Type | Description |
---|---|
IMigrationProcessor |
RunnerContext
Gets the runner context
Declaration
IRunnerContext RunnerContext { get; }
Property Value
Type | Description |
---|---|
IRunnerContext |
Methods
| Improve this Doc View SourceDown(IMigration)
Executes an Down
migration
Declaration
void Down(IMigration migration)
Parameters
Type | Name | Description |
---|---|---|
IMigration | migration | The migration to execute |
HasMigrationsToApplyDown(Int64)
Returns true
when there are migrations to revert
Declaration
bool HasMigrationsToApplyDown(long version)
Parameters
Type | Name | Description |
---|---|---|
Int64 | version | The target version |
Returns
Type | Description |
---|---|
Boolean |
|
HasMigrationsToApplyRollback()
Are there migrations available for a rollback?
Declaration
bool HasMigrationsToApplyRollback()
Returns
Type | Description |
---|---|
Boolean |
|
HasMigrationsToApplyUp(Nullable<Int64>)
Returns true
when there are migrations to apply
Declaration
bool HasMigrationsToApplyUp(long? version = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Int64> | version | The target version (or |
Returns
Type | Description |
---|---|
Boolean |
|
ListMigrations()
List all migrations to the logger
Declaration
void ListMigrations()
MigrateDown(Int64)
Migrate down to the given version
Declaration
void MigrateDown(long version)
Parameters
Type | Name | Description |
---|---|---|
Int64 | version | The version to migrate down to |
MigrateUp()
Executes all found (and unapplied) migrations
Declaration
void MigrateUp()
MigrateUp(Int64)
Executes all found (and unapplied) migrations up to the given version
Declaration
void MigrateUp(long version)
Parameters
Type | Name | Description |
---|---|---|
Int64 | version | The target version to migrate to (inclusive) |
Rollback(Int32)
Rollback the given number of steps
Declaration
void Rollback(int steps)
Parameters
Type | Name | Description |
---|---|---|
Int32 | steps | The number of steps to rollback |
RollbackToVersion(Int64)
Rollback to a given version
Declaration
void RollbackToVersion(long version)
Parameters
Type | Name | Description |
---|---|---|
Int64 | version | The target version to rollback to |
Up(IMigration)
Executes an Up
migration
Declaration
void Up(IMigration migration)
Parameters
Type | Name | Description |
---|---|---|
IMigration | migration | The migration to execute |
ValidateVersionOrder()
Validate that there were no missing migration versions
Declaration
void ValidateVersionOrder()
Remarks
Throws an exception if a missing migration was found.