Class AlterColumnExpression
Represents a migration expression used to alter the definition of an existing column in a database table. This may include changing the column's type, constraints, or other properties.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class AlterColumnExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceAlterColumnExpression(IMigrationContext)
Initializes a new instance of the AlterColumnExpression class with the specified migration context.
Declaration
public AlterColumnExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the migration operation. |
Properties
View SourceColumn
Gets or sets the definition of the column to be altered.
Declaration
public virtual ColumnDefinition Column { get; set; }
Property Value
| Type | Description |
|---|---|
| ColumnDefinition |
SchemaName
Gets or sets the name of the schema that contains the column to be altered.
Declaration
public virtual string? SchemaName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TableName
Gets or sets the name of the table containing the column to be altered.
Declaration
public virtual string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |