Interface IColumnTypeSyntax<TNext>
Defines the column type
Namespace: FluentMigrator.Builders
Assembly: FluentMigrator.Abstractions.dll
Syntax
public interface IColumnTypeSyntax<TNext> where TNext : IFluentSyntax
Type Parameters
Name | Description |
---|---|
TNext | The interface to return after a type was specified |
Methods
| Edit this page View SourceAsAnsiString()
Defines the column type as ANSI string (single byte character set)
Declaration
TNext AsAnsiString()
Returns
Type | Description |
---|---|
TNext | The next step |
AsAnsiString(int)
Defines the column type as ANSI string (single byte character set) with the given size
Declaration
TNext AsAnsiString(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum size (usually in bytes) of the ansi string |
Returns
Type | Description |
---|---|
TNext | The next step |
AsAnsiString(int, string)
Defines the column type as ANSI string (single byte character set) with the given size
and collationName
Declaration
TNext AsAnsiString(int size, string collationName)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum size (usually in bytes) of the ansi string |
string | collationName | The collation to use for this column |
Returns
Type | Description |
---|---|
TNext | The next step |
AsAnsiString(string)
Defines the column type as ANSI string (single byte character set) with the given collationName
Declaration
TNext AsAnsiString(string collationName)
Parameters
Type | Name | Description |
---|---|---|
string | collationName | The collation to use for this column |
Returns
Type | Description |
---|---|
TNext | The next step |
AsBinary()
Defines the column type as BLOB
Declaration
TNext AsBinary()
Returns
Type | Description |
---|---|
TNext | The next step |
AsBinary(int)
Defines the column type as BLOB
Declaration
TNext AsBinary(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum size of the BLOB (in bytes) |
Returns
Type | Description |
---|---|
TNext | The next step |
AsBoolean()
Defines the column type as bool (or bit)
Declaration
TNext AsBoolean()
Returns
Type | Description |
---|---|
TNext | The next step |
AsByte()
Defines the column type as byte
Declaration
TNext AsByte()
Returns
Type | Description |
---|---|
TNext | The next step |
AsCurrency()
Defines the column type as currency
Declaration
TNext AsCurrency()
Returns
Type | Description |
---|---|
TNext | The next step |
AsCustom(string)
Defines the column with a custom (DB-specific) type
Declaration
TNext AsCustom(string customType)
Parameters
Type | Name | Description |
---|---|---|
string | customType | The custom type as SQL identifier |
Returns
Type | Description |
---|---|
TNext | The next step |
AsDate()
Defines the column type as date
Declaration
TNext AsDate()
Returns
Type | Description |
---|---|
TNext | The next step |
AsDateTime()
Defines the column type as DateTime
Declaration
TNext AsDateTime()
Returns
Type | Description |
---|---|
TNext | The next step |
AsDateTime2()
Defines the column type as DateTime with extended range and precision
Declaration
TNext AsDateTime2()
Returns
Type | Description |
---|---|
TNext | The next step |
AsDateTimeOffset()
Defines the column type as DateTimeOffset
Declaration
TNext AsDateTimeOffset()
Returns
Type | Description |
---|---|
TNext | The next step |
AsDateTimeOffset(int)
Defines the column type as DateTimeOffset
Declaration
TNext AsDateTimeOffset(int precision)
Parameters
Type | Name | Description |
---|---|---|
int | precision | The number of digits for the fraction of a second |
Returns
Type | Description |
---|---|
TNext | The next step |
AsDecimal()
Defines the column type as decimal
Declaration
TNext AsDecimal()
Returns
Type | Description |
---|---|
TNext | The next step |
AsDecimal(int, int)
Defines the column type as decimal with given size and precision
Declaration
TNext AsDecimal(int size, int precision)
Parameters
Type | Name | Description |
---|---|---|
int | size | The number of digits |
int | precision | The number of digits after the comma |
Returns
Type | Description |
---|---|
TNext | The next step |
AsDouble()
Defines the column type as double
Declaration
TNext AsDouble()
Returns
Type | Description |
---|---|
TNext | The next step |
AsFixedLengthAnsiString(int)
Defines the column type as ANSI string with fixed length
Declaration
TNext AsFixedLengthAnsiString(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The length of the string in bytes |
Returns
Type | Description |
---|---|
TNext | The next step |
AsFixedLengthAnsiString(int, string)
Defines the column type as ANSI string with fixed length
Declaration
TNext AsFixedLengthAnsiString(int size, string collationName)
Parameters
Type | Name | Description |
---|---|---|
int | size | The length of the string in bytes |
string | collationName | The name of the collation to use |
Returns
Type | Description |
---|---|
TNext | The next step |
AsFixedLengthString(int)
Defines the column type as unicode string with a fixed length
Declaration
TNext AsFixedLengthString(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum length of the string in code points |
Returns
Type | Description |
---|---|
TNext | The next step |
AsFixedLengthString(int, string)
Defines the column type as unicode string with a fixed length
Declaration
TNext AsFixedLengthString(int size, string collationName)
Parameters
Type | Name | Description |
---|---|---|
int | size | The length of the string in code points |
string | collationName | The name of the collation to use |
Returns
Type | Description |
---|---|
TNext | The next step |
AsFloat()
Defines the column type as a float
Declaration
TNext AsFloat()
Returns
Type | Description |
---|---|
TNext | The next step |
AsGuid()
Defines the column type as a Guid
Declaration
TNext AsGuid()
Returns
Type | Description |
---|---|
TNext | The next step |
AsInt16()
Defines the column type as a short
Declaration
TNext AsInt16()
Returns
Type | Description |
---|---|
TNext | The next step |
AsInt32()
Defines the column type as a int
Declaration
TNext AsInt32()
Returns
Type | Description |
---|---|
TNext | The next step |
AsInt64()
Defines the column type as a long
Declaration
TNext AsInt64()
Returns
Type | Description |
---|---|
TNext | The next step |
AsString()
Defines the column type as unicode string
Declaration
TNext AsString()
Returns
Type | Description |
---|---|
TNext | The next step |
AsString(int)
Defines the column type as unicode string
Declaration
TNext AsString(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum length in code points |
Returns
Type | Description |
---|---|
TNext | The next step |
AsString(int, string)
Defines the column type as unicode string
Declaration
TNext AsString(int size, string collationName)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum length in code points |
string | collationName | The name of the collation |
Returns
Type | Description |
---|---|
TNext | The next step |
AsString(string)
Defines the column type as unicode string
Declaration
TNext AsString(string collationName)
Parameters
Type | Name | Description |
---|---|---|
string | collationName | The name of the collation |
Returns
Type | Description |
---|---|
TNext | The next step |
AsTime()
Defines the column type as TimeSpan
Declaration
TNext AsTime()
Returns
Type | Description |
---|---|
TNext | The next step |
AsXml()
Defines the column type as XML
Declaration
TNext AsXml()
Returns
Type | Description |
---|---|
TNext | The next step |
AsXml(int)
Defines the column type as XML
Declaration
TNext AsXml(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The maximum size |
Returns
Type | Description |
---|---|
TNext | The next step |