Search Results for

    Show / Hide Table of Contents

    Class RunnerOptions

    The options for a migration runner

    Inheritance
    object
    RunnerOptions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.Runner.Initialization
    Assembly: FluentMigrator.Runner.Core.dll
    Syntax
    public class RunnerOptions

    Constructors

    RunnerOptions()

    Initializes a new instance of the RunnerOptions class.

    Declaration
    public RunnerOptions()

    RunnerOptions(IRunnerContext)

    Initializes a new instance of the RunnerOptions class.

    Declaration
    [Obsolete]
    public RunnerOptions(IRunnerContext runnerContext)
    Parameters
    Type Name Description
    IRunnerContext runnerContext

    The runner context

    Properties

    AllowBreakingChange

    Gets or sets a value indicating whether the migration runner is allowed to apply breaking changes

    Declaration
    public bool AllowBreakingChange { get; set; }
    Property Value
    Type Description
    bool

    ApplicationContext

    Gets or sets the arbitrary application context passed to the task runner

    Declaration
    [Obsolete("Use dependency injection to access 'application state'.")]
    public object ApplicationContext { get; set; }
    Property Value
    Type Description
    object

    IncludeUntaggedMaintenances

    Gets or sets a value indicating whether untagged maintenance items should always be loaded/executed.

    Declaration
    public bool IncludeUntaggedMaintenances { get; set; }
    Property Value
    Type Description
    bool

    IncludeUntaggedMigrations

    Gets or sets a value indicating whether untagged migrations should always be loaded/executed.

    Declaration
    public bool IncludeUntaggedMigrations { get; set; }
    Property Value
    Type Description
    bool

    NoConnection

    Gets or sets a value indicating whether no connection should be used

    Declaration
    public bool NoConnection { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The difference between this and PreviewOnly is, that the preview-only mode uses the connection to determine the current state of the database.

    Profile

    Gets or sets the profile migrations to apply

    Declaration
    [CanBeNull]
    public string Profile { get; set; }
    Property Value
    Type Description
    string

    StartVersion

    Gets or sets the start version

    Declaration
    public long StartVersion { get; set; }
    Property Value
    Type Description
    long
    Remarks

    This will be used only if NoConnection is set to true. Otherwise current state of target database will determine which migrations are needed.

    Steps

    Gets or sets the number of versions to apply

    Declaration
    public int Steps { get; set; }
    Property Value
    Type Description
    int

    Tags

    Gets or sets the tags the migrations must match

    Declaration
    [CanBeNull]
    [ItemNotNull]
    public string[] Tags { get; set; }
    Property Value
    Type Description
    string[]
    Remarks

    All migrations are matched when no tags were specified

    Task

    Gets or sets the task to execute

    Declaration
    [CanBeNull]
    public string Task { get; set; }
    Property Value
    Type Description
    string

    TransactionPerSession

    Use one transaction for the whole session

    Declaration
    public bool TransactionPerSession { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The default transaction behavior is to use one transaction per migration.

    Version

    Gets or sets the target version

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

    Methods

    SetValuesFrom(IRunnerContext)

    Sets the values from the given runner context

    Declaration
    [Obsolete]
    public void SetValuesFrom(IRunnerContext runnerContext)
    Parameters
    Type Name Description
    IRunnerContext runnerContext

    The runner context

    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.