Search Results for

    Show / Hide Table of Contents

    Class AutoScriptMigration

    Migration that automatically uses embedded SQL scripts depending on the database type name

    Inheritance
    object
    MigrationBase
    AutoScriptMigration
    Implements
    IMigration
    Inherited Members
    MigrationBase.ApplicationContext
    MigrationBase.ConnectionString
    MigrationBase.GetUpExpressions(IMigrationContext)
    MigrationBase.GetDownExpressions(IMigrationContext)
    MigrationBase.Alter
    MigrationBase.Create
    MigrationBase.Rename
    MigrationBase.Insert
    MigrationBase.Schema
    MigrationBase.IfDatabase(params string[])
    MigrationBase.IfDatabase(Predicate<string>)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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 Source

    AutoScriptMigration()

    Declaration
    [Obsolete]
    protected AutoScriptMigration()
    | Edit this page View Source

    AutoScriptMigration(IEnumerable<IEmbeddedResourceProvider>)

    Declaration
    protected AutoScriptMigration(IEnumerable<IEmbeddedResourceProvider> embeddedResourceProviders)
    Parameters
    Type Name Description
    IEnumerable<IEmbeddedResourceProvider> embeddedResourceProviders

    Methods

    | Edit this page View Source

    Down()

    Collects the DOWN migration expressions

    Declaration
    public override sealed void Down()
    Overrides
    MigrationBase.Down()
    | Edit this page View Source

    Up()

    Collect the UP migration expressions

    Declaration
    public override sealed void Up()
    Overrides
    MigrationBase.Up()

    Implements

    IMigration
    • Edit this page
    • View Source
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.