Interface IDeleteBuilder
Builds a Delete expression.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete
Assembly: Umbraco.Infrastructure.dll
Syntax
public interface IDeleteBuilder : IFluentBuilder
Methods
View SourceColumn(string)
Specifies the column to be deleted in the current delete expression.
Declaration
IDeleteColumnBuilder Column(string columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName | The name of the column to delete. |
Returns
| Type | Description |
|---|---|
| IDeleteColumnBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.IDeleteColumnBuilder to continue building the delete expression. |
DefaultConstraint()
Begins building an expression to delete a default constraint from a table.
Declaration
IDeleteDefaultConstraintOnTableBuilder DefaultConstraint()
Returns
| Type | Description |
|---|---|
| IDeleteDefaultConstraintOnTableBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.IDeleteDefaultConstraintOnTableBuilder to continue building the delete expression. |
ForeignKey()
Begins the definition of a delete operation for a foreign key constraint.
Declaration
IDeleteForeignKeyFromTableBuilder ForeignKey()
Returns
| Type | Description |
|---|---|
| IDeleteForeignKeyFromTableBuilder | An IDeleteForeignKeyFromTableBuilder to continue building the delete expression. |
ForeignKey(string)
Specifies the foreign key to be deleted in the migration.
Declaration
IDeleteForeignKeyOnTableBuilder ForeignKey(string foreignKeyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | foreignKeyName | The name of the foreign key to delete. |
Returns
| Type | Description |
|---|---|
| IDeleteForeignKeyOnTableBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.IDeleteForeignKeyOnTableBuilder that allows further configuration of the delete operation. |
FromTable(string)
Specifies the table to delete data from.
Declaration
IDeleteDataBuilder FromTable(string tableName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName |
Returns
| Type | Description |
|---|---|
| IDeleteDataBuilder |
Index()
Specifies the index to delete in the current table.
Declaration
IDeleteIndexForTableBuilder Index()
Returns
| Type | Description |
|---|---|
| IDeleteIndexForTableBuilder | An IDeleteIndexForTableBuilder for further configuration of the index deletion. |
Index(string)
Specifies the name of the index to delete as part of a migration expression.
Declaration
IDeleteIndexForTableBuilder Index(string indexName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | indexName | The name of the index to delete. |
Returns
| Type | Description |
|---|---|
| IDeleteIndexForTableBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.IDeleteIndexForTableBuilder to continue building the delete expression. |
KeysAndIndexes(string, bool, bool)
Builds and executes an expression to delete keys and indexes from the specified table.
Declaration
IExecutableBuilder KeysAndIndexes(string tableName, bool local = true, bool foreign = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | The name of the table from which to delete keys and indexes. |
| bool | local | If true, deletes local (primary and unique) keys and indexes. |
| bool | foreign | If true, deletes foreign keys and related indexes. |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder | An IExecutableBuilder to execute the delete operation. |
KeysAndIndexes<TDto>(bool, bool)
Builds a Delete Keys and Indexes expression, and executes.
Declaration
IExecutableBuilder KeysAndIndexes<TDto>(bool local = true, bool foreign = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | local | |
| bool | foreign |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder |
Type Parameters
| Name | Description |
|---|---|
| TDto |
PrimaryKey(string)
Specifies the primary key to delete in the migration expression.
Declaration
IDeleteConstraintBuilder PrimaryKey(string primaryKeyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | primaryKeyName | The name of the primary key to be deleted. |
Returns
| Type | Description |
|---|---|
| IDeleteConstraintBuilder | An IDeleteConstraintBuilder for further constraint configuration. |
Table(string)
Specifies the table to delete.
Declaration
IExecutableBuilder Table(string tableName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder |
UniqueConstraint(string)
Specifies which unique constraint should be deleted from the database schema.
Declaration
IDeleteConstraintBuilder UniqueConstraint(string constraintName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | constraintName | The name of the unique constraint to delete. |
Returns
| Type | Description |
|---|---|
| IDeleteConstraintBuilder | An Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.IDeleteConstraintBuilder to continue building the delete expression. |