Search Results for

    Show / Hide Table of Contents

    Class MigrationInfo

    The default IMigrationInfo implementation for migrations with the MigrationAttribute

    Inheritance
    object
    MigrationInfo
    Implements
    IMigrationInfo
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.Infrastructure
    Assembly: FluentMigrator.Abstractions.dll
    Syntax
    public class MigrationInfo : IMigrationInfo

    Constructors

    | Edit this page View Source

    MigrationInfo(long, TransactionBehavior, IMigration)

    Initializes a new instance of the MigrationInfo class.

    Declaration
    public MigrationInfo(long version, TransactionBehavior transactionBehavior, IMigration migration)
    Parameters
    Type Name Description
    long version

    The migration version

    TransactionBehavior transactionBehavior

    The desired transaction behavior

    IMigration migration

    The underlying migration

    | Edit this page View Source

    MigrationInfo(long, TransactionBehavior, bool, IMigration)

    Initializes a new instance of the MigrationInfo class.

    Declaration
    public MigrationInfo(long version, TransactionBehavior transactionBehavior, bool isBreakingChange, IMigration migration)
    Parameters
    Type Name Description
    long version

    The migration version

    TransactionBehavior transactionBehavior

    The desired transaction behavior

    bool isBreakingChange

    Indicates wether the migration is a breaking change

    IMigration migration

    The underlying migration

    | Edit this page View Source

    MigrationInfo(long, string, TransactionBehavior, bool, Func<IMigration>)

    Initializes a new instance of the MigrationInfo class.

    Declaration
    public MigrationInfo(long version, string description, TransactionBehavior transactionBehavior, bool isBreakingChange, Func<IMigration> migrationFunc)
    Parameters
    Type Name Description
    long version

    The migration version

    string description

    The migration description

    TransactionBehavior transactionBehavior

    The desired transaction behavior

    bool isBreakingChange

    Indicates wether the migration is a breaking change

    Func<IMigration> migrationFunc

    A function to get the IMigration instance

    Properties

    | Edit this page View Source

    Description

    Gets the migration description

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

    IsBreakingChange

    Gets a value indicating whether the migration is a breaking change

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

    Migration

    Gets the migration

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

    TransactionBehavior

    Gets the desired transaction behavior

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

    Version

    Gets the migration version

    Declaration
    public long Version { get; }
    Property Value
    Type Description
    long

    Methods

    | Edit this page View Source

    AddTrait(string, object)

    Manually adds a trait to the migration

    Declaration
    public void AddTrait(string name, object value)
    Parameters
    Type Name Description
    string name

    The trait name

    object value

    The trait value

    | Edit this page View Source

    GetName()

    Gets the migration name

    Declaration
    public string GetName()
    Returns
    Type Description
    string
    | Edit this page View Source

    HasTrait(string)

    Returns a value indicating whether a given trait was specified

    Declaration
    public bool HasTrait(string name)
    Parameters
    Type Name Description
    string name

    The trait name

    Returns
    Type Description
    bool

    true when the trait was specified

    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()
    | Edit this page View Source

    Trait(string)

    Gets the trait object with the given name

    Declaration
    public object Trait(string name)
    Parameters
    Type Name Description
    string name

    The trait name

    Returns
    Type Description
    object

    The object associated with the given name

    Implements

    IMigrationInfo
    • 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.