MigrationBuilder.RenameTable(String, String, String, String) Method

Definition

Builds a RenameTableOperation to rename an existing table.

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

Parameters

name
String

The name of the table to be renamed.

schema
String

The schema that contains the table, or null to use the default schema.

newName
String

The new table name or null if only the schema has changed.

newSchema
String

The new schema name, 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