Class MigrationRunnerBuilderExtensions
Extension methods for the IMigrationRunnerBuilder interface
Inherited Members
Namespace: FluentMigrator.Runner
Assembly: FluentMigrator.Runner.dll
Syntax
public static class MigrationRunnerBuilderExtensions
Methods
| Edit this page View SourceAsGlobalPreview(IMigrationRunnerBuilder, bool)
Sets the global preview mode
Declaration
public static IMigrationRunnerBuilder AsGlobalPreview(this IMigrationRunnerBuilder builder, bool preview = true)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
bool | preview | The global preview mode |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
ConfigureGlobalProcessorOptions(IMigrationRunnerBuilder, Action<ProcessorOptions>)
Sets configuration action for global processor options
Declaration
public static IMigrationRunnerBuilder ConfigureGlobalProcessorOptions(this IMigrationRunnerBuilder builder, Action<ProcessorOptions> configureAction)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
Action<ProcessorOptions> | configureAction | The configuration action |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
ScanIn(IMigrationRunnerBuilder, params Assembly[])
Scans for types in the given assemblies
Declaration
public static IScanInBuilder ScanIn(this IMigrationRunnerBuilder builder, params Assembly[] assemblies)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
Assembly[] | assemblies | The assemblies to scan |
Returns
Type | Description |
---|---|
IScanInBuilder | The next step |
WithGlobalCommandTimeout(IMigrationRunnerBuilder, TimeSpan)
Sets the global command timeout
Declaration
public static IMigrationRunnerBuilder WithGlobalCommandTimeout(this IMigrationRunnerBuilder builder, TimeSpan commandTimeout)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
TimeSpan | commandTimeout | The global command timeout |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithGlobalConnectionString(IMigrationRunnerBuilder, Func<IServiceProvider, string>)
Sets the global connection string
Declaration
public static IMigrationRunnerBuilder WithGlobalConnectionString(this IMigrationRunnerBuilder builder, Func<IServiceProvider, string> configureConnectionString)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
Func<IServiceProvider, string> | configureConnectionString | The function that creates the connection string. |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithGlobalConnectionString(IMigrationRunnerBuilder, string)
Sets the global connection string
Declaration
public static IMigrationRunnerBuilder WithGlobalConnectionString(this IMigrationRunnerBuilder builder, string connectionStringOrName)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
string | connectionStringOrName | The connection string or name to use |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithGlobalStripComments(IMigrationRunnerBuilder, bool)
Sets the global strip comment
Declaration
public static IMigrationRunnerBuilder WithGlobalStripComments(this IMigrationRunnerBuilder builder, bool stripComments)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
bool | stripComments | The global strip comments |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithMigrationsIn(IMigrationRunnerBuilder, params Assembly[])
Adds the migrations
Declaration
public static IMigrationRunnerBuilder WithMigrationsIn(this IMigrationRunnerBuilder builder, params Assembly[] assemblies)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
Assembly[] | assemblies | The target assemblies |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithRunnerConventions(IMigrationRunnerBuilder, IMigrationRunnerConventions)
Sets the migration runner conventions
Declaration
public static IMigrationRunnerBuilder WithRunnerConventions(this IMigrationRunnerBuilder builder, IMigrationRunnerConventions conventions)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
IMigrationRunnerConventions | conventions | The migration runner conventions |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |
WithVersionTable(IMigrationRunnerBuilder, IVersionTableMetaData)
Sets the version table meta data
Declaration
public static IMigrationRunnerBuilder WithVersionTable(this IMigrationRunnerBuilder builder, IVersionTableMetaData versionTableMetaData)
Parameters
Type | Name | Description |
---|---|---|
IMigrationRunnerBuilder | builder | The runner builder |
IVersionTableMetaData | versionTableMetaData | The version table meta data |
Returns
Type | Description |
---|---|
IMigrationRunnerBuilder | The runner builder |