Class CreateConstraintExpression
Represents an expression used to define and create a database constraint during a migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class CreateConstraintExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceCreateConstraintExpression(IMigrationContext, ConstraintType)
Initializes a new instance of the CreateConstraintExpression class with the specified migration context and constraint type.
Declaration
public CreateConstraintExpression(IMigrationContext context, ConstraintType constraint)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the migration. |
| ConstraintType | constraint | The ConstraintType representing the type of constraint to create. |
Properties
View SourceConstraint
Gets the constraint definition.
Declaration
public ConstraintDefinition Constraint { get; }
Property Value
| Type | Description |
|---|---|
| ConstraintDefinition |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |