Search Results for

    Show / Hide Table of Contents

    Class SqlServerExtensions

    Inheritance
    object
    SqlServerExtensions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.SqlServer
    Assembly: FluentMigrator.Extensions.SqlServer.dll
    Syntax
    public static class SqlServerExtensions

    Fields

    | Edit this page View Source

    ConstraintType

    Declaration
    public static readonly string ConstraintType
    Field Value
    Type Description
    string
    | Edit this page View Source

    DataCompression

    Declaration
    public static readonly string DataCompression
    Field Value
    Type Description
    string
    | Edit this page View Source

    IdentityIncrement

    Declaration
    public static readonly string IdentityIncrement
    Field Value
    Type Description
    string
    | Edit this page View Source

    IdentityInsert

    Declaration
    public static readonly string IdentityInsert
    Field Value
    Type Description
    string
    | Edit this page View Source

    IdentitySeed

    Declaration
    public static readonly string IdentitySeed
    Field Value
    Type Description
    string
    | Edit this page View Source

    IncludesList

    Declaration
    public static readonly string IncludesList
    Field Value
    Type Description
    string
    | Edit this page View Source

    IndexColumnNullsDistinct

    Declaration
    public static readonly string IndexColumnNullsDistinct
    Field Value
    Type Description
    string
    | Edit this page View Source

    IndexFilter

    Declaration
    public static readonly string IndexFilter
    Field Value
    Type Description
    string
    | Edit this page View Source

    OnlineIndex

    Declaration
    public static readonly string OnlineIndex
    Field Value
    Type Description
    string
    | Edit this page View Source

    RowGuidColumn

    Declaration
    public static readonly string RowGuidColumn
    Field Value
    Type Description
    string
    | Edit this page View Source

    SchemaAuthorization

    Declaration
    public static readonly string SchemaAuthorization
    Field Value
    Type Description
    string
    | Edit this page View Source

    SparseColumn

    Declaration
    public static readonly string SparseColumn
    Field Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Authorization(ICreateSchemaOptionsSyntax, string)

    Sets the schema owner during schema creation

    Declaration
    public static ICreateSchemaOptionsSyntax Authorization(this ICreateSchemaOptionsSyntax expression, string owner)
    Parameters
    Type Name Description
    ICreateSchemaOptionsSyntax expression

    The schema creation expression

    string owner

    The schema owner

    Returns
    Type Description
    ICreateSchemaOptionsSyntax

    The next step

    | Edit this page View Source

    Clustered(ICreateConstraintOptionsSyntax)

    Declaration
    public static void Clustered(this ICreateConstraintOptionsSyntax expression)
    Parameters
    Type Name Description
    ICreateConstraintOptionsSyntax expression
    | Edit this page View Source

    Filter(ICreateIndexOptionsSyntax, string)

    Declaration
    public static ICreateIndexOptionsSyntax Filter(this ICreateIndexOptionsSyntax expression, string filter)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression
    string filter
    Returns
    Type Description
    ICreateIndexOptionsSyntax
    | Edit this page View Source

    Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, int, int)

    Makes a column an Identity column using the specified seed and increment values.

    Declaration
    public static TNext Identity<TNext, TNextFk>(this IColumnOptionSyntax<TNext, TNextFk> expression, int seed, int increment) where TNext : IFluentSyntax where TNextFk : IFluentSyntax
    Parameters
    Type Name Description
    IColumnOptionSyntax<TNext, TNextFk> expression

    Column on which to apply the identity.

    int seed

    Starting value of the identity.

    int increment

    Increment value of the identity.

    Returns
    Type Description
    TNext
    Type Parameters
    Name Description
    TNext
    TNextFk
    | Edit this page View Source

    Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, long, int)

    Makes a column an Identity column using the specified seed and increment values with bigint support.

    Declaration
    public static TNext Identity<TNext, TNextFk>(this IColumnOptionSyntax<TNext, TNextFk> expression, long seed, int increment) where TNext : IFluentSyntax where TNextFk : IFluentSyntax
    Parameters
    Type Name Description
    IColumnOptionSyntax<TNext, TNextFk> expression

    Column on which to apply the identity.

    long seed

    Starting value of the identity.

    int increment

    Increment value of the identity.

    Returns
    Type Description
    TNext
    Type Parameters
    Name Description
    TNext
    TNextFk
    | Edit this page View Source

    Include(ICreateIndexOnColumnSyntax, string)

    Declaration
    public static ICreateIndexNonKeyColumnSyntax Include(this ICreateIndexOnColumnSyntax expression, string columnName)
    Parameters
    Type Name Description
    ICreateIndexOnColumnSyntax expression
    string columnName
    Returns
    Type Description
    ICreateIndexNonKeyColumnSyntax
    | Edit this page View Source

    Include(ICreateIndexOptionsSyntax, string)

    Declaration
    public static ICreateIndexOptionsSyntax Include(this ICreateIndexOptionsSyntax expression, string columnName)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression
    string columnName
    Returns
    Type Description
    ICreateIndexOptionsSyntax
    | Edit this page View Source

    NonClustered(ICreateConstraintOptionsSyntax)

    Declaration
    public static void NonClustered(this ICreateConstraintOptionsSyntax expression)
    Parameters
    Type Name Description
    ICreateConstraintOptionsSyntax expression
    | Edit this page View Source

    NullsDistinct(ICreateIndexColumnUniqueOptionsSyntax, bool)

    Column should have unique values. Only one row with null value should be accepted (default for most known database engines).

    Declaration
    public static ICreateIndexColumnUniqueOptionsSyntax NullsDistinct(this ICreateIndexColumnUniqueOptionsSyntax expression, bool nullsAreDistinct = true)
    Parameters
    Type Name Description
    ICreateIndexColumnUniqueOptionsSyntax expression

    The expression to set this option for

    bool nullsAreDistinct

    true when nulls should be distinct

    Returns
    Type Description
    ICreateIndexColumnUniqueOptionsSyntax

    The expression

    | Edit this page View Source

    NullsDistinct(ICreateIndexMoreColumnOptionsSyntax, bool)

    Column should have unique values. Only one row with null value should be accepted (default for most known database engines).

    Declaration
    public static ICreateIndexOnColumnSyntax NullsDistinct(this ICreateIndexMoreColumnOptionsSyntax expression, bool nullsAreDistinct = true)
    Parameters
    Type Name Description
    ICreateIndexMoreColumnOptionsSyntax expression

    The expression to set this option for

    bool nullsAreDistinct

    true when nulls should be distinct

    Returns
    Type Description
    ICreateIndexOnColumnSyntax

    The expression

    | Edit this page View Source

    NullsNotDistinct(ICreateIndexColumnUniqueOptionsSyntax)

    Column should have unique values, but multiple rows with null values should be accepted.

    Declaration
    public static ICreateIndexColumnUniqueOptionsSyntax NullsNotDistinct(this ICreateIndexColumnUniqueOptionsSyntax expression)
    Parameters
    Type Name Description
    ICreateIndexColumnUniqueOptionsSyntax expression

    The expression to set this option for

    Returns
    Type Description
    ICreateIndexColumnUniqueOptionsSyntax

    The expression

    | Edit this page View Source

    NullsNotDistinct(ICreateIndexMoreColumnOptionsSyntax)

    Column should have unique values, but multiple rows with null values should be accepted.

    Declaration
    public static ICreateIndexOnColumnSyntax NullsNotDistinct(this ICreateIndexMoreColumnOptionsSyntax expression)
    Parameters
    Type Name Description
    ICreateIndexMoreColumnOptionsSyntax expression

    The expression to set this option for

    Returns
    Type Description
    ICreateIndexOnColumnSyntax

    The expression

    | Edit this page View Source

    Online(ICreateConstraintOptionsSyntax, bool)

    Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation. The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.

    Declaration
    public static ICreateConstraintOptionsSyntax Online(this ICreateConstraintOptionsSyntax expression, bool active = true)
    Parameters
    Type Name Description
    ICreateConstraintOptionsSyntax expression

    The expression to use to set the WITH(ONLINE=) option

    bool active

    true Long-term table locks are not held. This allows queries or updates to the underlying table to continue. false Table locks are applied and the table is unavailable for the duration of the index operation.

    Returns
    Type Description
    ICreateConstraintOptionsSyntax
    | Edit this page View Source

    Online(ICreateIndexOptionsSyntax, bool)

    Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation. The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.

    Declaration
    public static ICreateIndexOptionsSyntax Online(this ICreateIndexOptionsSyntax expression, bool active = true)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression

    The expression to use to set the WITH(ONLINE=) option

    bool active

    true Long-term table locks are not held. This allows queries or updates to the underlying table to continue. false Table locks are applied and the table is unavailable for the duration of the index operation.

    Returns
    Type Description
    ICreateIndexOptionsSyntax
    | Edit this page View Source

    Online(IDeleteConstraintInSchemaOptionsSyntax, bool)

    Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation. The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.

    Declaration
    public static IDeleteConstraintInSchemaOptionsSyntax Online(this IDeleteConstraintInSchemaOptionsSyntax expression, bool active = true)
    Parameters
    Type Name Description
    IDeleteConstraintInSchemaOptionsSyntax expression

    The expression to use to set the WITH(ONLINE=) option

    bool active

    true Long-term table locks are not held. This allows queries or updates to the underlying table to continue. false Table locks are applied and the table is unavailable for the duration of the index operation.

    Returns
    Type Description
    IDeleteConstraintInSchemaOptionsSyntax
    | Edit this page View Source

    Online(IDeleteIndexOptionsSyntax, bool)

    Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation. The ONLINE option can only be specified in certain situations, please refer to documentation for SQL Server 2005 and newer.

    Declaration
    public static IDeleteIndexOptionsSyntax Online(this IDeleteIndexOptionsSyntax expression, bool active = true)
    Parameters
    Type Name Description
    IDeleteIndexOptionsSyntax expression

    The expression to use to set the WITH(ONLINE=) option

    bool active

    true Long-term table locks are not held. This allows queries or updates to the underlying table to continue. false Table locks are applied and the table is unavailable for the duration of the index operation.

    Returns
    Type Description
    IDeleteIndexOptionsSyntax
    | Edit this page View Source

    RowGuid(ICreateTableColumnOptionOrWithColumnSyntax)

    Declaration
    public static ICreateTableColumnOptionOrWithColumnSyntax RowGuid(this ICreateTableColumnOptionOrWithColumnSyntax expression)
    Parameters
    Type Name Description
    ICreateTableColumnOptionOrWithColumnSyntax expression
    Returns
    Type Description
    ICreateTableColumnOptionOrWithColumnSyntax
    | Edit this page View Source

    Sparse(ICreateTableColumnOptionOrWithColumnSyntax)

    Declaration
    public static ICreateTableColumnOptionOrWithColumnSyntax Sparse(this ICreateTableColumnOptionOrWithColumnSyntax expression)
    Parameters
    Type Name Description
    ICreateTableColumnOptionOrWithColumnSyntax expression
    Returns
    Type Description
    ICreateTableColumnOptionOrWithColumnSyntax
    | Edit this page View Source

    UniqueNullsDistinct(ICreateIndexOptionsSyntax, bool)

    Index should have unique values. Only one row with null value should be accepted (default for most known database engines).

    Declaration
    public static ICreateIndexOnColumnSyntax UniqueNullsDistinct(this ICreateIndexOptionsSyntax expression, bool nullsAreDistinct = true)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression

    The expression to set this option for

    bool nullsAreDistinct

    true when nulls should be distinct

    Returns
    Type Description
    ICreateIndexOnColumnSyntax

    The expression

    | Edit this page View Source

    UniqueNullsNotDistinct(ICreateIndexOptionsSyntax)

    Index should have unique values, but multiple rows with null values should be accepted.

    Declaration
    public static ICreateIndexOnColumnSyntax UniqueNullsNotDistinct(this ICreateIndexOptionsSyntax expression)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression

    The expression to set this option for

    Returns
    Type Description
    ICreateIndexOnColumnSyntax

    The expression

    | Edit this page View Source

    WithDataCompression(ICreateIndexOptionsSyntax, DataCompressionType)

    Declaration
    public static ICreateIndexOptionsSyntax WithDataCompression(this ICreateIndexOptionsSyntax expression, DataCompressionType dataCompressionType)
    Parameters
    Type Name Description
    ICreateIndexOptionsSyntax expression
    DataCompressionType dataCompressionType
    Returns
    Type Description
    ICreateIndexOptionsSyntax
    | Edit this page View Source

    WithIdentityInsert(IInsertDataSyntax)

    Inserts data using Sql Server's IDENTITY INSERT feature.

    Declaration
    public static IInsertDataSyntax WithIdentityInsert(this IInsertDataSyntax expression)
    Parameters
    Type Name Description
    IInsertDataSyntax expression
    Returns
    Type Description
    IInsertDataSyntax
    • 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.