MigrationBuilder Class

Definition

A builder providing a fluentish API for building MigrationOperations.

public class MigrationBuilder
type MigrationBuilder = class
Public Class MigrationBuilder
Inheritance
MigrationBuilder

Constructors

MigrationBuilder(String)

Creates a new instance of the builder.

Properties

ActiveProvider

The name of the database provider being used.

Operations

The list of MigrationOperations being built.

Methods

AddCheckConstraint(String, String, String, String)

Builds an AddCheckConstraintOperation to add a new check constraint to a table.

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

Builds an AddColumnOperation to add a new column to a table.

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>)

Builds an AddColumnOperation to add a new column to a table.

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String)

Builds an AddColumnOperation to add a new column to a table.

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>)

Builds an AddColumnOperation to add a new column to a table.

AddForeignKey(String, String, String, String, String, String, String, ReferentialAction, ReferentialAction)

Builds an AddForeignKeyOperation to add a new foreign key to a table.

AddForeignKey(String, String, String[], String, String, String, String[], ReferentialAction, ReferentialAction)

Builds an AddForeignKeyOperation to add a new composite (multi-column) foreign key to a table.

AddPrimaryKey(String, String, String, String)

Builds an AddPrimaryKeyOperation to add a new primary key to a table.

AddPrimaryKey(String, String, String[], String)

Builds an AddPrimaryKeyOperation to add a new composite (multi-column) primary key to a table.

AddUniqueConstraint(String, String, String, String)

Builds an AddUniqueConstraintOperation to add a new unique constraint to a table.

AddUniqueConstraint(String, String, String[], String)

Builds an AddUniqueConstraintOperation to add a new composite (multi-column) unique constraint to a table.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String)

Builds an AlterColumnOperation to alter an existing column.

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>)

Builds an AlterColumnOperation to alter an existing column.

AlterDatabase()

Builds an AlterDatabaseOperation to alter an existing database.

AlterDatabase(String, String)

Builds an AlterDatabaseOperation to alter an existing database.

AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

Builds an AlterSequenceOperation to alter an existing sequence.

AlterTable(String, String)

Builds an AlterTableOperation to alter an existing table.

AlterTable(String, String, String, String)

Builds an AlterTableOperation to alter an existing table.

CreateCheckConstraint(String, String, String, String)

Warning, this API is obsolete. Use AddCheckConstraint(String, String, String, String) instead.

Builds an AddCheckConstraintOperation to create a new check constraint.

CreateIndex(String, String, String, String, Boolean)
CreateIndex(String, String, String, String, Boolean, String)

Builds an CreateIndexOperation to create a new index.

CreateIndex(String, String, String[], String, Boolean)
CreateIndex(String, String, String[], String, Boolean, String)

Builds an CreateIndexOperation to create a new composite (multi-column) index.

CreateSequence(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

Builds an CreateSequenceOperation to create a new sequence.

CreateSequence<T>(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

Builds an CreateSequenceOperation to create a new sequence.

CreateTable<TColumns>(String, Func<ColumnsBuilder,TColumns>, String, Action<CreateTableBuilder<TColumns>>)

Builds an CreateTableOperation to create a new table.

CreateTable<TColumns>(String, Func<ColumnsBuilder,TColumns>, String, Action<CreateTableBuilder<TColumns>>, String)

Builds an CreateTableOperation to create a new table.

DeleteData(String, String, Object, String)

Builds an DeleteDataOperation to delete a single row of seed data.

DeleteData(String, String, Object[], String)

Builds an DeleteDataOperation to delete multiple rows of seed data.

DeleteData(String, String, String, Object, String)

Builds an DeleteDataOperation to delete a single row of seed data.

DeleteData(String, String, String, Object[], String)

Builds an DeleteDataOperation to delete multiple rows of seed data.

DeleteData(String, String[], Object[,], String)

Builds an DeleteDataOperation to delete multiple rows of seed data from a table with a composite (multi-column) key.

DeleteData(String, String[], Object[], String)

Builds an DeleteDataOperation to delete a single row of seed data from a table with a composite (multi-column) key.

DeleteData(String, String[], String[], Object[,], String)

Builds an DeleteDataOperation to delete multiple rows of seed data from a table with a composite (multi-column) key.

DeleteData(String, String[], String[], Object[], String)

Builds an DeleteDataOperation to delete a single row of seed data from a table with a composite (multi-column) key.

DropCheckConstraint(String, String, String)

Builds an DropCheckConstraintOperation to drop an existing check constraint.

DropColumn(String, String, String)

Builds an DropColumnOperation to drop an existing column.

DropForeignKey(String, String, String)

Builds an DropForeignKeyOperation to drop an existing foreign key constraint.

DropIndex(String, String, String)

Builds an DropIndexOperation to drop an existing index.

DropPrimaryKey(String, String, String)

Builds an DropPrimaryKeyOperation to drop an existing primary key.

DropSchema(String)

Builds an DropSchemaOperation to drop an existing schema.

DropSequence(String, String)

Builds an DropSequenceOperation to drop an existing sequence.

DropTable(String, String)

Builds an DropTableOperation to drop an existing table.

DropUniqueConstraint(String, String, String)

Builds an DropUniqueConstraintOperation to drop an existing unique constraint.

EnsureSchema(String)

Builds an EnsureSchemaOperation to ensure that a schema exists.

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

InsertData(String, String, Object, String)

Builds an InsertDataOperation to insert a single seed data value for a single column.

InsertData(String, String, Object[], String)

Builds an InsertDataOperation to insert multiple rows of seed data values for a single column.

InsertData(String, String, String, Object, String)

Builds an InsertDataOperation to insert a single seed data value for a single column.

InsertData(String, String, String, Object[], String)

Builds an InsertDataOperation to insert multiple rows of seed data values for a single column.

InsertData(String, String[], Object[,], String)

Builds an InsertDataOperation to insert multiple rows of seed data values for multiple columns.

InsertData(String, String[], Object[], String)

Builds an InsertDataOperation to insert a single row of seed data values.

InsertData(String, String[], String[], Object[,], String)

Builds an InsertDataOperation to insert multiple rows of seed data values for multiple columns.

InsertData(String, String[], String[], Object[], String)

Builds an InsertDataOperation to insert a single row of seed data values.

RenameColumn(String, String, String, String)

Builds an RenameColumnOperation to rename an existing column.

RenameIndex(String, String, String, String)

Builds an RenameIndexOperation to rename an existing index.

RenameSequence(String, String, String, String)

Builds an RenameSequenceOperation to rename an existing sequence.

RenameTable(String, String, String, String)

Builds an RenameTableOperation to rename an existing table.

RestartSequence(String, Int64, String)

Builds an RestartSequenceOperation to re-start an existing sequence.

Sql(String, Boolean)

Builds an SqlOperation to execute raw SQL.

ToString()

Returns a string that represents the current object.

UpdateData(String, String, Object, String, Object, String)

Builds an UpdateDataOperation to update a single row of seed data.

UpdateData(String, String, Object, String[], Object[], String)

Builds an UpdateDataOperation to update a single row of seed data.

UpdateData(String, String, Object[], String, Object[], String)

Builds an UpdateDataOperation to update multiple rows of seed data.

UpdateData(String, String, Object[], String[], Object[,], String)

Builds an UpdateDataOperation to update multiple rows of seed data.

UpdateData(String, String[], Object[,], String, Object[], String)

Builds an UpdateDataOperation to update multiple rows of seed data for a table with a composite (multi-column) key.

UpdateData(String, String[], Object[,], String[], Object[,], String)

Builds an UpdateDataOperation to update multiple rows of seed data for a table with a composite (multi-column) key.

UpdateData(String, String[], Object[], String, Object, String)

Builds an UpdateDataOperation to update a single row of seed data for a table with a composite (multi-column) key.

UpdateData(String, String[], Object[], String[], Object[], String)

Builds an UpdateDataOperation to update a single row of seed data for a table with a composite (multi-column) key.

UpdateData(String, String[], String[], Object[,], String[], String[], Object[,], String)

Builds an UpdateDataOperation to update multiple rows of seed data for a table with a composite (multi-column) key.

UpdateData(String, String[], String[], Object[], String[], String[], Object[], String)

Builds an UpdateDataOperation to update a single row of seed data for a table with a composite (multi-column) key.

Extension Methods

IsSqlite(MigrationBuilder)

Returns true if the database provider currently in use is the SQLite provider.

IsSqlServer(MigrationBuilder)

Returns true if the database provider currently in use is the SQL Server provider.

Applies to