Search Results for

    Show / Hide Table of Contents

    Interface IColumnOptionSyntax<TNext, TNextFk>

    Specify column options

    Namespace: FluentMigrator.Builders
    Assembly: FluentMigrator.Abstractions.dll
    Syntax
    public interface IColumnOptionSyntax<TNext, TNextFk> where TNext : IFluentSyntax where TNextFk : IFluentSyntax
    Type Parameters
    Name Description
    TNext

    The interface of the next step

    TNextFk

    The interface of the next step after a foreign key definition

    Methods

    | Edit this page View Source

    ForeignKey()

    Specifies a foreign key

    Declaration
    TNextFk ForeignKey()
    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    ForeignKey(string, string)

    Specifies a foreign key

    Declaration
    TNextFk ForeignKey(string primaryTableName, string primaryColumnName)
    Parameters
    Type Name Description
    string primaryTableName

    The primary table name

    string primaryColumnName

    The primary tables column name

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    ForeignKey(string, string, string)

    Specifies a foreign key

    Declaration
    TNextFk ForeignKey(string foreignKeyName, string primaryTableName, string primaryColumnName)
    Parameters
    Type Name Description
    string foreignKeyName

    The foreign key name

    string primaryTableName

    The primary table name

    string primaryColumnName

    The primary tables column name

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    ForeignKey(string, string, string, string)

    Specifies a foreign key

    Declaration
    TNextFk ForeignKey(string foreignKeyName, string primaryTableSchema, string primaryTableName, string primaryColumnName)
    Parameters
    Type Name Description
    string foreignKeyName

    The foreign key name

    string primaryTableSchema

    The primary tables schema name

    string primaryTableName

    The primary table name

    string primaryColumnName

    The primary tables column name

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    Identity()

    Sets the columns identity configuration

    Declaration
    TNext Identity()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    Indexed()

    Create an index for this column

    Declaration
    TNext Indexed()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    Indexed(string)

    Create an index for this column

    Declaration
    TNext Indexed(string indexName)
    Parameters
    Type Name Description
    string indexName

    The index name

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    NotNullable()

    Specify the column as not-nullable

    Declaration
    TNext NotNullable()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    Nullable()

    Specify the column as nullable

    Declaration
    TNext Nullable()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    PrimaryKey()

    Define the column as primary key

    Declaration
    TNext PrimaryKey()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    PrimaryKey(string)

    Define the column as primary key

    Declaration
    TNext PrimaryKey(string primaryKeyName)
    Parameters
    Type Name Description
    string primaryKeyName

    The primary key constraint name

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    ReferencedBy(string, string)

    Specify a foreign key pointing to the current column

    Declaration
    TNextFk ReferencedBy(string foreignTableName, string foreignColumnName)
    Parameters
    Type Name Description
    string foreignTableName

    The foreign key table

    string foreignColumnName

    The foreign key column

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    ReferencedBy(string, string, string)

    Specify a foreign key pointing to the current column

    Declaration
    TNextFk ReferencedBy(string foreignKeyName, string foreignTableName, string foreignColumnName)
    Parameters
    Type Name Description
    string foreignKeyName

    The foreign key name

    string foreignTableName

    The foreign key table

    string foreignColumnName

    The foreign key column

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    ReferencedBy(string, string, string, string)

    Specify a foreign key pointing to the current column

    Declaration
    TNextFk ReferencedBy(string foreignKeyName, string foreignTableSchema, string foreignTableName, string foreignColumnName)
    Parameters
    Type Name Description
    string foreignKeyName

    The foreign key name

    string foreignTableSchema

    The foreign key table schema

    string foreignTableName

    The foreign key table

    string foreignColumnName

    The foreign key column

    Returns
    Type Description
    TNextFk

    The next step

    | Edit this page View Source

    Unique()

    Specify a unique index for the column

    Declaration
    TNext Unique()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    Unique(string)

    Specify a unique index for the column

    Declaration
    TNext Unique(string indexName)
    Parameters
    Type Name Description
    string indexName

    The index name

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    WithColumnDescription(string)

    Sets the columns description

    Declaration
    TNext WithColumnDescription(string description)
    Parameters
    Type Name Description
    string description

    The description

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    WithDefault(SystemMethods)

    Sets the default function for the column

    Declaration
    TNext WithDefault(SystemMethods method)
    Parameters
    Type Name Description
    SystemMethods method

    The function providing the default value

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    WithDefaultValue(object)

    Sets the default value for the column

    Declaration
    TNext WithDefaultValue(object value)
    Parameters
    Type Name Description
    object value

    The default value

    Returns
    Type Description
    TNext

    The next step

    Extension Methods

    OracleExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, OracleGenerationType)
    OracleExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, OracleGenerationType, int, int)
    OracleExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, OracleGenerationType, long, int)
    OracleExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, OracleGenerationType, long, int, long, long)
    PostgresExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, PostgresGenerationType)
    SqlServerExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, int, int)
    SqlServerExtensions.Identity<TNext, TNextFk>(IColumnOptionSyntax<TNext, TNextFk>, long, int)
    • 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.