Search Results for

    Show / Hide Table of Contents

    Class MaintenanceAttribute

    Annotates migrations that should always be executed at a specified stage.

    Inheritance
    object
    Attribute
    MaintenanceAttribute
    Implements
    _Attribute
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator
    Assembly: FluentMigrator.Abstractions.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
    public class MaintenanceAttribute : Attribute, _Attribute
    Remarks

    Migration annotated with MaintenanceAttribute will be always executed when migrating the database to the latest version. The execution stage in which it would be executed is defined by Stage. The transaction behavior can also be defined with the TransactionBehavior, which if not specified defaults to the default transaction behavior.

    Constructors

    | Edit this page View Source

    MaintenanceAttribute(MigrationStage)

    Initializes a new instance of the MaintenanceAttribute class

    Declaration
    public MaintenanceAttribute(MigrationStage stage)
    Parameters
    Type Name Description
    MigrationStage stage

    The migration stage when the migration should be applied

    | Edit this page View Source

    MaintenanceAttribute(MigrationStage, TransactionBehavior)

    Initializes a new instance of the MaintenanceAttribute class.

    Declaration
    public MaintenanceAttribute(MigrationStage stage, TransactionBehavior transactionBehavior)
    Parameters
    Type Name Description
    MigrationStage stage

    The migration stage when the migration should be applied

    TransactionBehavior transactionBehavior

    The desired transaction behavior

    Properties

    | Edit this page View Source

    Stage

    Gets the migration stage when the migration should be applied

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

    TransactionBehavior

    Gets the desired transaction behavior

    Declaration
    public TransactionBehavior TransactionBehavior { get; }
    Property Value
    Type Description
    TransactionBehavior

    Implements

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