Share via


MigrationBuilder.DropUniqueConstraint(String, String, String) Method

Definition

Builds a DropUniqueConstraintOperation to drop an existing unique constraint.

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)

Parameters

name
String

The name of the constraint to drop.

table
String

The table that contains the constraint.

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.

Remarks

See Database migrations for more information and examples.

Applies to