MigrationBuilder.AlterTable 方法

定义

重载

AlterTable(String, String)

生成 以 AlterTableOperation 更改现有表。

AlterTable(String, String, String, String)

生成 以 AlterTableOperation 更改现有表。

AlterTable(String, String)

Source:
MigrationBuilder.cs
Source:
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)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
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

要与表关联的上一条注释。

返回

允许将批注添加到操作的生成器。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于