Class RenameBuilder
Provides methods to construct rename expressions used in database migrations. This builder is typically used to specify how database objects should be renamed during a migration.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename
Assembly: Umbraco.Infrastructure.dll
Syntax
public class RenameBuilder : IRenameBuilder, IFluentBuilder
Constructors
View SourceRenameBuilder(IMigrationContext)
Initializes a new instance of the RenameBuilder class using the specified migration context.
Declaration
public RenameBuilder(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the rename operation. |
Methods
View SourceColumn(string)
Specifies the column to rename in a database table.
Declaration
public IRenameColumnBuilder Column(string oldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldName | The current name of the column to be renamed. |
Returns
| Type | Description |
|---|---|
| IRenameColumnBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.IRenameColumnBuilder for specifying the new column name. |
Table(string)
Begins a table rename operation by specifying the current name of the table.
Declaration
public IRenameTableBuilder Table(string oldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldName | The current name of the table to rename. |
Returns
| Type | Description |
|---|---|
| IRenameTableBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.IRenameTableBuilder to continue the rename operation. |