Share via


MigrationBuilder.AlterColumn Method

Definition

Overloads

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing) As OperationBuilder(Of AlterColumnOperation)

Type Parameters

T

Parameters

name
String
table
String
type
String
unicode
Nullable<Boolean>
maxLength
Nullable<Int32>
rowVersion
Boolean
schema
String
nullable
Boolean
defaultValue
Object
defaultValueSql
String
computedColumnSql
String

Returns

Applies to

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

Builds an AlterColumnOperation to alter an existing column.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type, bool? unicode, int? maxLength, bool rowVersion, string schema, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Type oldClrType, string oldType, bool? oldUnicode, int? oldMaxLength, bool oldRowVersion, bool oldNullable, object oldDefaultValue, string oldDefaultValueSql, string oldComputedColumnSql);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)
Public Overridable Function AlterColumn(Of T) (name As String, table As String, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, schema As String, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, oldClrType As Type, oldType As String, oldUnicode As Nullable(Of Boolean), oldMaxLength As Nullable(Of Integer), oldRowVersion As Boolean, oldNullable As Boolean, oldDefaultValue As Object, oldDefaultValueSql As String, oldComputedColumnSql As String) As AlterOperationBuilder(Of AlterColumnOperation)

Type Parameters

T

The CLR type that the column is mapped to.

Parameters

name
String

The column name.

table
String

The name of the table that contains the column.

type
String

The store/database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if not specified or not applicable.

maxLength
Nullable<Int32>

The maximum length of data that can be stored in the column, or null if not specified or not applicable.

rowVersion
Boolean

Indicates whether or not the column acts as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server.

schema
String

The schema that contains the table, or null if the default schema should be used.

nullable
Boolean

Indicates whether or not the column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

oldClrType
Type

The CLR type that the column was previously mapped to. Can be null, in which case previous value is considered unknown.

oldType
String

The previous store/database type of the column. Can be null, in which case previous value is considered unknown.

oldUnicode
Nullable<Boolean>

Indicates whether or not the column could previously contain Unicode data, or null if not specified or not applicable.

oldMaxLength
Nullable<Int32>

The previous maximum length of data that can be stored in the column, or null if not specified or not applicable.

oldRowVersion
Boolean

Indicates whether or not the column previously acted as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server. Can be null, in which case previous value is considered unknown.

oldNullable
Boolean

Indicates whether or not the column could previously store NULL values. Can be null, in which case previous value is considered unknown.

oldDefaultValue
Object

The previous default value for the column. Can be null, in which case previous value is considered unknown.

oldDefaultValueSql
String

The previous SQL expression used for the column's default constraint. Can be null, in which case previous value is considered unknown.

oldComputedColumnSql
String

The previous SQL expression used to compute the column value. Can be null, in which case previous value is considered unknown.

Returns

A builder to allow annotations to be added to the operation.

Applies to

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

Builds an AlterColumnOperation to alter an existing column.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)

Type Parameters

T

The CLR type that the column is mapped to.

Parameters

name
String

The column name.

table
String

The name of the table that contains the column.

type
String

The store/database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if not specified or not applicable.

maxLength
Nullable<Int32>

The maximum length of data that can be stored in the column, or null if not specified or not applicable.

rowVersion
Boolean

Indicates whether or not the column acts as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server.

schema
String

The schema that contains the table, or null if the default schema should be used.

nullable
Boolean

Indicates whether or not the column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

oldClrType
Type

The CLR type that the column was previously mapped to. Can be null, in which case previous value is considered unknown.

oldType
String

The previous store/database type of the column. Can be null, in which case previous value is considered unknown.

oldUnicode
Nullable<Boolean>

Indicates whether or not the column could previously contain Unicode data, or null if not specified or not applicable.

oldMaxLength
Nullable<Int32>

The previous maximum length of data that can be stored in the column, or null if not specified or not applicable.

oldRowVersion
Boolean

Indicates whether or not the column previously acted as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server. Can be null, in which case previous value is considered unknown.

oldNullable
Boolean

Indicates whether or not the column could previously store NULL values. Can be null, in which case previous value is considered unknown.

oldDefaultValue
Object

The previous default value for the column. Can be null, in which case previous value is considered unknown.

oldDefaultValueSql
String

The previous SQL expression used for the column's default constraint. Can be null, in which case previous value is considered unknown.

oldComputedColumnSql
String

The previous SQL expression used to compute the column value. Can be null, in which case previous value is considered unknown.

fixedLength
Nullable<Boolean>

Indicates whether or not the column is constrained to fixed-length data.

oldFixedLength
Nullable<Boolean>

Indicates whether or not the column was previously constrained to fixed-length data.

Returns

A builder to allow annotations to be added to the operation.

Applies to

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

Builds an AlterColumnOperation to alter an existing column.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string comment = default, string oldComment = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing, Optional oldComment As String = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)

Type Parameters

T

The CLR type that the column is mapped to.

Parameters

name
String

The column name.

table
String

The name of the table that contains the column.

type
String

The store/database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if not specified or not applicable.

maxLength
Nullable<Int32>

The maximum length of data that can be stored in the column, or null if not specified or not applicable.

rowVersion
Boolean

Indicates whether or not the column acts as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server.

schema
String

The schema that contains the table, or null if the default schema should be used.

nullable
Boolean

Indicates whether or not the column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

oldClrType
Type

The CLR type that the column was previously mapped to. Can be null, in which case previous value is considered unknown.

oldType
String

The previous store/database type of the column. Can be null, in which case previous value is considered unknown.

oldUnicode
Nullable<Boolean>

Indicates whether or not the column could previously contain Unicode data, or null if not specified or not applicable.

oldMaxLength
Nullable<Int32>

The previous maximum length of data that can be stored in the column, or null if not specified or not applicable.

oldRowVersion
Boolean

Indicates whether or not the column previously acted as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server. Can be null, in which case previous value is considered unknown.

oldNullable
Boolean

Indicates whether or not the column could previously store NULL values. Can be null, in which case previous value is considered unknown.

oldDefaultValue
Object

The previous default value for the column. Can be null, in which case previous value is considered unknown.

oldDefaultValueSql
String

The previous SQL expression used for the column's default constraint. Can be null, in which case previous value is considered unknown.

oldComputedColumnSql
String

The previous SQL expression used to compute the column value. Can be null, in which case previous value is considered unknown.

fixedLength
Nullable<Boolean>

Indicates whether or not the column is constrained to fixed-length data.

oldFixedLength
Nullable<Boolean>

Indicates whether or not the column was previously constrained to fixed-length data.

comment
String

A comment to associate with the column.

oldComment
String

The previous comment to associate with the column.

Returns

A builder to allow annotations to be added to the operation.

Applies to

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

Builds an AlterColumnOperation to alter an existing column.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string comment = default, string oldComment = default, string collation = default, string oldCollation = default, int? precision = default, int? oldPrecision = default, int? scale = default, int? oldScale = default, bool? stored = default, bool? oldStored = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string? type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string? schema = default, bool nullable = false, object? defaultValue = default, string? defaultValueSql = default, string? computedColumnSql = default, Type? oldClrType = default, string? oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object? oldDefaultValue = default, string? oldDefaultValueSql = default, string? oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string? comment = default, string? oldComment = default, string? collation = default, string? oldCollation = default, int? precision = default, int? oldPrecision = default, int? scale = default, int? oldScale = default, bool? stored = default, bool? oldStored = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string * string * string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string * string * string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing, Optional oldComment As String = Nothing, Optional collation As String = Nothing, Optional oldCollation As String = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional oldPrecision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional oldScale As Nullable(Of Integer) = Nothing, Optional stored As Nullable(Of Boolean) = Nothing, Optional oldStored As Nullable(Of Boolean) = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)

Type Parameters

T

The CLR type that the column is mapped to.

Parameters

name
String

The column name.

table
String

The name of the table that contains the column.

type
String

The store/database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if not specified or not applicable.

maxLength
Nullable<Int32>

The maximum length of data that can be stored in the column, or null if not specified or not applicable.

rowVersion
Boolean

Indicates whether or not the column acts as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server.

schema
String

The schema that contains the table, or null if the default schema should be used.

nullable
Boolean

Indicates whether or not the column can store null values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

oldClrType
Type

The CLR type that the column was previously mapped to. Can be null, in which case previous value is considered unknown.

oldType
String

The previous store/database type of the column. Can be null, in which case previous value is considered unknown.

oldUnicode
Nullable<Boolean>

Indicates whether or not the column could previously contain Unicode data, or null if not specified or not applicable.

oldMaxLength
Nullable<Int32>

The previous maximum length of data that can be stored in the column, or null if not specified or not applicable.

oldRowVersion
Boolean

Indicates whether or not the column previously acted as an automatic concurrency token, such as a rowversion/timestamp column in SQL Server. Can be null, in which case previous value is considered unknown.

oldNullable
Boolean

Indicates whether or not the column could previously store null values. Can be null, in which case previous value is considered unknown.

oldDefaultValue
Object

The previous default value for the column. Can be null, in which case previous value is considered unknown.

oldDefaultValueSql
String

The previous SQL expression used for the column's default constraint. Can be null, in which case previous value is considered unknown.

oldComputedColumnSql
String

The previous SQL expression used to compute the column value. Can be null, in which case previous value is considered unknown.

fixedLength
Nullable<Boolean>

Indicates whether or not the column is constrained to fixed-length data.

oldFixedLength
Nullable<Boolean>

Indicates whether or not the column was previously constrained to fixed-length data.

comment
String

A comment to associate with the column.

oldComment
String

The previous comment to associate with the column.

collation
String

A collation to apply to the column.

oldCollation
String

The previous collation to apply to the column.

precision
Nullable<Int32>

The maximum number of digits that is allowed in this column, or null if not specified or not applicable.

oldPrecision
Nullable<Int32>

The previous maximum number of digits that is allowed in this column, or null if not specified or not applicable.

scale
Nullable<Int32>

The maximum number of decimal places that is allowed in this column, or null if not specified or not applicable.

oldScale
Nullable<Int32>

The previous maximum number of decimal places that is allowed in this column, or null if not specified or not applicable.

stored
Nullable<Boolean>

Whether the value of the computed column is stored in the database or not.

oldStored
Nullable<Boolean>

Whether the value of the previous computed column was stored in the database or not.

Returns

A builder to allow annotations to be added to the operation.

Remarks

See Database migrations for more information and examples.

Applies to