MigrationBuilder.AlterTable Method

Definition

Overloads

AlterTable(String, String)

Builds an AlterTableOperation to alter an existing table.

AlterTable(String, String, String, String)

Builds an AlterTableOperation to alter an existing table.

AlterTable(String, String)

Builds an AlterTableOperation to alter an existing table.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation> AlterTable (string name, string schema = default);
abstract member AlterTable : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation>
override this.AlterTable : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation>
Public Overridable Function AlterTable (name As String, Optional schema As String = Nothing) As AlterOperationBuilder(Of AlterTableOperation)

Parameters

name
String

The table name.

schema
String

The schema that contains the table, or null to use the default schema.

Returns

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

Applies to

AlterTable(String, String, String, String)

Builds an AlterTableOperation to alter an existing table.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation> AlterTable (string name, string schema = default, string comment = default, string oldComment = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation> AlterTable (string name, string? schema = default, string? comment = default, string? oldComment = default);
abstract member AlterTable : string * string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation>
override this.AlterTable : string * string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation>
Public Overridable Function AlterTable (name As String, Optional schema As String = Nothing, Optional comment As String = Nothing, Optional oldComment As String = Nothing) As AlterOperationBuilder(Of AlterTableOperation)

Parameters

name
String

The table name.

schema
String

The schema that contains the table, or null to use the default schema.

comment
String

A comment to associate with the table.

oldComment
String

The previous comment to associate with the table.

Returns

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

Remarks

See Database migrations for more information and examples.

Applies to