共用方式為


MigrationBuilder.AlterTable 方法

定義

多載

AlterTable(String, String)

建置 以 AlterTableOperation 改變現有的資料表。

AlterTable(String, String, String, String)

建置 以 AlterTableOperation 改變現有的資料表。

AlterTable(String, String)

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

建置 以 AlterTableOperation 改變現有的資料表。

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)

參數

name
String

資料表名稱。

schema
String

包含資料表的架構,或使用 null 預設架構。

傳回

允許將批註加入至作業的產生器。

適用於

AlterTable(String, String, String, String)

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

建置 以 AlterTableOperation 改變現有的資料表。

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)

參數

name
String

資料表名稱。

schema
String

包含資料表的架構,或使用 null 預設架構。

comment
String

要與資料表產生關聯的批註。

oldComment
String

要與資料表產生關聯的前一個批註。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於