Class DeleteDefaultConstraintExpression
Represents an expression used in a database migration to delete a default constraint from a table column.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class DeleteDefaultConstraintExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceDeleteDefaultConstraintExpression(IMigrationContext)
Initializes a new instance of the DeleteDefaultConstraintExpression class, which is used to define an expression for deleting a default constraint in a database migration.
Declaration
public DeleteDefaultConstraintExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext providing migration-specific information and services. |
Properties
View SourceColumnName
Gets or sets the name of the column associated with the default constraint to delete.
Declaration
public virtual string? ColumnName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ConstraintName
Gets or sets the name of the default constraint to delete.
Declaration
public virtual string? ConstraintName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HasDefaultConstraint
Gets or sets a value indicating whether a default constraint is present on the column.
Declaration
public virtual bool HasDefaultConstraint { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
TableName
Gets or sets the name of the table from which the default constraint will be deleted.
Declaration
public virtual string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |