Class CreateColumnExpression
Represents an expression to create a new column in a database table.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class CreateColumnExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceCreateColumnExpression(IMigrationContext)
Initializes a new instance of the CreateColumnExpression class, using the specified migration context to provide migration-related information and services.
Declaration
public CreateColumnExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext that supplies context and services for the migration operation. |
Properties
View SourceColumn
Gets or sets the ColumnDefinition representing the column to be created in the migration.
Declaration
public ColumnDefinition Column { get; set; }
Property Value
| Type | Description |
|---|---|
| ColumnDefinition |
TableName
Gets or sets the name of the table to which the column will be added.
Declaration
public string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |