Share via


MigrationBuilder.RenameIndex(String, String, String, String) Method

Definition

Builds a RenameIndexOperation to rename an existing index.

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

Parameters

name
String

The name of the index to be renamed.

newName
String

The new name for the column.

table
String

The table that contains the index.

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