Interface IMigrationRunner
The migration runner
Inherited Members
Namespace: FluentMigrator.Runner
Assembly: FluentMigrator.Runner.dll
Syntax
public interface IMigrationRunner : IMigrationScopeStarter
Properties
| Edit this page View SourceMigrationAssemblies
Gets the assemblies searched for migrations, profile migrations, etc...
Declaration
[Obsolete]
[CanBeNull]
IAssemblyCollection MigrationAssemblies { get; }
Property Value
Type | Description |
---|---|
IAssemblyCollection |
MigrationLoader
Gets or sets the migration loader to be used by this migration runner
Declaration
[NotNull]
IMigrationInformationLoader MigrationLoader { get; }
Property Value
Type | Description |
---|---|
IMigrationInformationLoader |
Processor
Gets the migration processor used by this runner
Declaration
[NotNull]
IMigrationProcessor Processor { get; }
Property Value
Type | Description |
---|---|
IMigrationProcessor |
RunnerContext
Gets the runner context
Declaration
[Obsolete]
[CanBeNull]
IRunnerContext RunnerContext { get; }
Property Value
Type | Description |
---|---|
IRunnerContext |
Methods
| Edit this page View SourceDown(IMigration)
Executes an Down
migration
Declaration
void Down(IMigration migration)
Parameters
Type | Name | Description |
---|---|---|
IMigration | migration | The migration to execute |
HasMigrationsToApplyDown(long)
Returns true
when there are migrations to revert
Declaration
bool HasMigrationsToApplyDown(long version)
Parameters
Type | Name | Description |
---|---|---|
long | version | The target version |
Returns
Type | Description |
---|---|
bool |
|
HasMigrationsToApplyRollback()
Are there migrations available for a rollback?
Declaration
bool HasMigrationsToApplyRollback()
Returns
Type | Description |
---|---|
bool |
|
HasMigrationsToApplyUp(long?)
Returns true
when there are migrations to apply
Declaration
bool HasMigrationsToApplyUp(long? version = null)
Parameters
Type | Name | Description |
---|---|---|
long? | version | The target version (or |
Returns
Type | Description |
---|---|
bool |
|
ListMigrations()
List all migrations to the logger
Declaration
void ListMigrations()
MigrateDown(long)
Migrate down to the given version
Declaration
void MigrateDown(long version)
Parameters
Type | Name | Description |
---|---|---|
long | version | The version to migrate down to |
MigrateUp()
Executes all found (and unapplied) migrations
Declaration
void MigrateUp()
MigrateUp(long)
Executes all found (and unapplied) migrations up to the given version
Declaration
void MigrateUp(long version)
Parameters
Type | Name | Description |
---|---|---|
long | version | The target version to migrate to (inclusive) |
Rollback(int)
Rollback the given number of steps
Declaration
void Rollback(int steps)
Parameters
Type | Name | Description |
---|---|---|
int | steps | The number of steps to rollback |
RollbackToVersion(long)
Rollback to a given version
Declaration
void RollbackToVersion(long version)
Parameters
Type | Name | Description |
---|---|---|
long | 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.