MigrationBuilder.RenameColumn(String, String, String, String) Method

Definition

Builds a RenameColumnOperation to rename an existing column.

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

Parameters

name
String

The name of the column to be renamed.

table
String

The table that contains the column.

newName
String

The new name for the column.

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