Class AlterDefaultConstraintExpression
Represents an expression to alter a default constraint in a database migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class AlterDefaultConstraintExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceAlterDefaultConstraintExpression(IMigrationContext)
Initializes a new instance of the AlterDefaultConstraintExpression class using the specified migration context.
Declaration
public AlterDefaultConstraintExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to be used for the alter default constraint expression. |
Properties
View SourceColumnName
Gets or sets the name of the column to which the default constraint applies.
Declaration
public virtual string? ColumnName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ConstraintName
Gets or sets the name of the default constraint to be altered.
Declaration
public virtual string? ConstraintName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultValue
Gets or sets the value to be used as the default for the constraint.
Declaration
public virtual object? DefaultValue { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
TableName
Gets or sets the name of the table to which the default constraint applies.
Declaration
public virtual string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |