Class AutoScriptMigration
Migration that automatically uses embedded SQL scripts depending on the database type name
Implements
Inherited Members
Namespace: FluentMigrator
Assembly: FluentMigrator.dll
Syntax
public abstract class AutoScriptMigration : MigrationBase, IMigration
Remarks
The embedded SQL scripts must end in Scripts.{Direction}.{Version}{DerivedTypeName}{DatabaseType}.sql.
The {Direction} can be Up or Down.
The {Version} is the migration version.
The {DerivedTypeName} is the name of the type derived from AutoScriptMigration.
The {DatabaseType} is the database type name. For SQL Server 2016, the variants SqlServer2016,
SqlServer, and Generic will be tested.
The behavior may be overriden by providing a custom FluentMigrator.Runner.Conventions.IAutoNameConvention.
Constructors
| Edit this page View SourceAutoScriptMigration()
Declaration
[Obsolete]
protected AutoScriptMigration()
AutoScriptMigration(IEnumerable<IEmbeddedResourceProvider>)
Declaration
protected AutoScriptMigration(IEnumerable<IEmbeddedResourceProvider> embeddedResourceProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IEmbeddedResourceProvider> | embeddedResourceProviders |
Methods
| Edit this page View SourceDown()
Collects the DOWN migration expressions
Declaration
public override sealed void Down()
Overrides
| Edit this page View SourceUp()
Collect the UP migration expressions
Declaration
public override sealed void Up()