Class RenameColumnBuilder
Provides a builder for renaming a column in a database table during a migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column
Assembly: Umbraco.Infrastructure.dll
Syntax
public class RenameColumnBuilder : ExpressionBuilderBase<RenameColumnExpression>, IRenameColumnToBuilder, IRenameColumnBuilder, IFluentBuilder, IExecutableBuilder
Constructors
View SourceRenameColumnBuilder(RenameColumnExpression)
Initializes a new instance of the RenameColumnBuilder class with the specified rename column expression.
Declaration
public RenameColumnBuilder(RenameColumnExpression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| RenameColumnExpression | expression | The RenameColumnExpression that defines the details of the column rename operation. |
Methods
View SourceDo()
Executes.
Declaration
public void Do()
OnTable(string)
Specifies the table on which the column rename operation will be performed.
Declaration
public IRenameColumnToBuilder OnTable(string tableName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | The name of the table containing the column to rename. |
Returns
| Type | Description |
|---|---|
| IRenameColumnToBuilder | An IRenameColumnToBuilder to continue configuring the rename operation. |
To(string)
Specifies the new name of the column.
Declaration
public IExecutableBuilder To(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The new name to assign to the column. |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.IExecutableBuilder that can be used to execute the rename operation. |