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 SourceForeignKey()
Specifies a foreign key
Declaration
TNextFk ForeignKey()
Returns
Type | Description |
---|---|
TNextFk | The next step |
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 |
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 |
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 |
Identity()
Sets the columns identity configuration
Declaration
TNext Identity()
Returns
Type | Description |
---|---|
TNext | The next step |
Indexed()
Create an index for this column
Declaration
TNext Indexed()
Returns
Type | Description |
---|---|
TNext | The next step |
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 |
NotNullable()
Specify the column as not-nullable
Declaration
TNext NotNullable()
Returns
Type | Description |
---|---|
TNext | The next step |
Nullable()
Specify the column as nullable
Declaration
TNext Nullable()
Returns
Type | Description |
---|---|
TNext | The next step |
PrimaryKey()
Define the column as primary key
Declaration
TNext PrimaryKey()
Returns
Type | Description |
---|---|
TNext | The next step |
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 |
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 |
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 |
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 |
Unique()
Specify a unique index for the column
Declaration
TNext Unique()
Returns
Type | Description |
---|---|
TNext | The next step |
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 |
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 |
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 |
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 |