Search Results for

    Show / Hide Table of Contents

    Class MigrationBase

    The base migration class

    Inheritance
    object
    MigrationBase
    AutoReversingMigration
    AutoReversingMigration
    AutoScriptMigration
    AutoScriptMigration
    Migration
    Migration
    Implements
    IMigration
    Inherited Members
    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 MigrationBase : IMigration

    Properties

    | Edit this page View Source

    Alter

    Gets the starting point for alterations

    Declaration
    public IAlterExpressionRoot Alter { get; }
    Property Value
    Type Description
    IAlterExpressionRoot
    | Edit this page View Source

    ApplicationContext

    Gets the arbitrary application context passed to the task runner

    Declaration
    public object ApplicationContext { get; protected set; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    ConnectionString

    Gets the connection string passed to the task runner

    Declaration
    public string ConnectionString { get; protected set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Create

    Gets the starting point for creating database objects

    Declaration
    public ICreateExpressionRoot Create { get; }
    Property Value
    Type Description
    ICreateExpressionRoot
    | Edit this page View Source

    Insert

    Gets the starting point for data insertion

    Declaration
    public IInsertExpressionRoot Insert { get; }
    Property Value
    Type Description
    IInsertExpressionRoot
    | Edit this page View Source

    Rename

    Gets the starting point for renaming database objects

    Declaration
    public IRenameExpressionRoot Rename { get; }
    Property Value
    Type Description
    IRenameExpressionRoot
    | Edit this page View Source

    Schema

    Gets the starting point for schema-rooted expressions

    Declaration
    public ISchemaExpressionRoot Schema { get; }
    Property Value
    Type Description
    ISchemaExpressionRoot

    Methods

    | Edit this page View Source

    Down()

    Collects the DOWN migration expressions

    Declaration
    public abstract void Down()
    | Edit this page View Source

    GetDownExpressions(IMigrationContext)

    Collects all Down migration expressions in the context.

    Declaration
    public virtual void GetDownExpressions(IMigrationContext context)
    Parameters
    Type Name Description
    IMigrationContext context

    The context to use while collecting the Down migration expressions

    | Edit this page View Source

    GetUpExpressions(IMigrationContext)

    Collects all Up migration expressions in the context.

    Declaration
    public virtual void GetUpExpressions(IMigrationContext context)
    Parameters
    Type Name Description
    IMigrationContext context

    The context to use while collecting the Up migration expressions

    | Edit this page View Source

    IfDatabase(Predicate<string>)

    Gets the starting point for database specific expressions

    Declaration
    public IIfDatabaseExpressionRoot IfDatabase(Predicate<string> databaseTypeFunc)
    Parameters
    Type Name Description
    Predicate<string> databaseTypeFunc

    The lambda that tests if the expression can be applied to the current database

    Returns
    Type Description
    IIfDatabaseExpressionRoot

    The database specific expression

    | Edit this page View Source

    IfDatabase(params string[])

    Gets the starting point for database specific expressions

    Declaration
    public IIfDatabaseExpressionRoot IfDatabase(params string[] databaseType)
    Parameters
    Type Name Description
    string[] databaseType

    The supported database types

    Returns
    Type Description
    IIfDatabaseExpressionRoot

    The database specific expression

    | Edit this page View Source

    Up()

    Collect the UP migration expressions

    Declaration
    public abstract void 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.