Class RenameColumnExpression
Represents an expression to rename a column in a database table.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class RenameColumnExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceRenameColumnExpression(IMigrationContext)
Initializes a new instance of the RenameColumnExpression class using the specified migration context.
Declaration
public RenameColumnExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to be used for the rename column operation. |
Properties
View SourceNewName
Gets or sets the new name to assign to the column during the rename operation.
Declaration
public virtual string? NewName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
OldName
Gets or sets the previous name of the column to be renamed.
Declaration
public virtual string? OldName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TableName
Gets or sets the name of the table containing the column to rename.
Declaration
public virtual string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |