Class CreateIndexExpression
Represents a migration expression used to create a database index.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class CreateIndexExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceCreateIndexExpression(IMigrationContext)
Initializes a new instance of the CreateIndexExpression class using the specified migration context.
Declaration
public CreateIndexExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to be used for the index creation expression. |
CreateIndexExpression(IMigrationContext, IndexDefinition)
Initializes a new instance of the CreateIndexExpression class with the specified migration context and index definition.
Declaration
public CreateIndexExpression(IMigrationContext context, IndexDefinition index)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the migration operation. |
| IndexDefinition | index | The IndexDefinition that defines the index to be created. |
Properties
View SourceIndex
Gets or sets the definition of the index to be created.
Declaration
public IndexDefinition Index { get; set; }
Property Value
| Type | Description |
|---|---|
| IndexDefinition |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |