MigrationBuilder.DropUniqueConstraint(String, String, String) 方法

定义

生成 以 DropUniqueConstraintOperation 删除现有唯一约束。

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

参数

name
String

要删除的约束的名称。

table
String

包含约束的表。

schema
String

包含表的架构,或使用 null 默认架构。

返回

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

注解

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

适用于