DbMigration DbMigration DbMigration Class

Definition

Base class for code-based migrations.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

public abstract class DbMigration : System.Data.Entity.Migrations.Infrastructure.IDbMigration
type DbMigration = class
    interface IDbMigration
Public MustInherit Class DbMigration
Implements IDbMigration
Inheritance
DbMigrationDbMigrationDbMigration
Implements

Constructors

DbMigration() DbMigration() DbMigration()

Methods

AddColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object) AddColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object) AddColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object)

Adds an operation to add a column to an existing table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AddForeignKey(String, String, String, String, Boolean, String, Object) AddForeignKey(String, String, String, String, Boolean, String, Object) AddForeignKey(String, String, String, String, Boolean, String, Object)

Adds an operation to create a new foreign key constraint.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AddForeignKey(String, String[], String, String[], Boolean, String, Object) AddForeignKey(String, String[], String, String[], Boolean, String, Object) AddForeignKey(String, String[], String, String[], Boolean, String, Object)

Adds an operation to create a new foreign key constraint.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AddPrimaryKey(String, String, String, Boolean, Object) AddPrimaryKey(String, String, String, Boolean, Object) AddPrimaryKey(String, String, String, Boolean, Object)

Adds an operation to create a new primary key.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AddPrimaryKey(String, String[], String, Boolean, Object) AddPrimaryKey(String, String[], String, Boolean, Object) AddPrimaryKey(String, String[], String, Boolean, Object)

Adds an operation to create a new primary key based on multiple columns.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AlterColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object) AlterColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object) AlterColumn(String, String, Func<ColumnBuilder,ColumnModel>, Object)

Adds an operation to alter the definition of an existing column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AlterStoredProcedure(String, String, Object) AlterStoredProcedure(String, String, Object) AlterStoredProcedure(String, String, Object)

Adds an operation to alter a stored procedure.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AlterStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object) AlterStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object) AlterStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object)

Adds an operation to alter a stored procedure.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

AlterTableAnnotations<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,AnnotationValues>, Object) AlterTableAnnotations<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,AnnotationValues>, Object) AlterTableAnnotations<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,AnnotationValues>, Object)

Adds an operation to handle changes in the annotations defined on tables.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

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

Adds an operation to create an index on multiple columns.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

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

Adds an operation to create an index on a single column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

CreateStoredProcedure(String, String, Object) CreateStoredProcedure(String, String, Object) CreateStoredProcedure(String, String, Object)

Adds an operation to create a new stored procedure.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object) CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object) CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object)

Adds an operation to create a new stored procedure.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, Object) CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, Object) CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, Object)

Adds an operation to create a new table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,Object>, Object) CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,Object>, Object) CreateTable<TColumns>(String, Func<ColumnBuilder,TColumns>, IDictionary<String,Object>, Object)

Adds an operation to create a new table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

Down() Down() Down()

Operations to be performed during the downgrade process.

DropColumn(String, String, Object) DropColumn(String, String, Object) DropColumn(String, String, Object)

Adds an operation to drop an existing column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropColumn(String, String, IDictionary<String,Object>, Object) DropColumn(String, String, IDictionary<String,Object>, Object) DropColumn(String, String, IDictionary<String,Object>, Object)

Adds an operation to drop an existing column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropForeignKey(String, String, String, String, Object) DropForeignKey(String, String, String, String, Object) DropForeignKey(String, String, String, String, Object)

Adds an operation to drop a foreign key constraint based on the column it targets.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropForeignKey(String, String, Object) DropForeignKey(String, String, Object) DropForeignKey(String, String, Object)

Adds an operation to drop a foreign key constraint based on its name.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropForeignKey(String, String, String, Object) DropForeignKey(String, String, String, Object) DropForeignKey(String, String, String, Object)

Adds an operation to drop a foreign key constraint based on the column it targets.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropForeignKey(String, String[], String, Object) DropForeignKey(String, String[], String, Object) DropForeignKey(String, String[], String, Object)

Adds an operation to drop a foreign key constraint based on the columns it targets.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropIndex(String, String[], Object) DropIndex(String, String[], Object) DropIndex(String, String[], Object)

Adds an operation to drop an index based on the columns it targets.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropIndex(String, String, Object) DropIndex(String, String, Object) DropIndex(String, String, Object)

Adds an operation to drop an index based on its name.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropPrimaryKey(String, Object) DropPrimaryKey(String, Object) DropPrimaryKey(String, Object)

Adds an operation to drop an existing primary key that was created with the default name.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropPrimaryKey(String, String, Object) DropPrimaryKey(String, String, Object) DropPrimaryKey(String, String, Object)

Adds an operation to drop an existing primary key that does not have the default name.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropStoredProcedure(String, Object) DropStoredProcedure(String, Object) DropStoredProcedure(String, Object)

Adds an operation to drop an existing stored procedure with the specified name.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropTable(String, Object) DropTable(String, Object) DropTable(String, Object)

Adds an operation to drop a table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropTable(String, IDictionary<String,IDictionary<String,Object>>, Object) DropTable(String, IDictionary<String,IDictionary<String,Object>>, Object) DropTable(String, IDictionary<String,IDictionary<String,Object>>, Object)

Adds an operation to drop a table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropTable(String, IDictionary<String,Object>, Object) DropTable(String, IDictionary<String,Object>, Object) DropTable(String, IDictionary<String,Object>, Object)

Adds an operation to drop a table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

DropTable(String, IDictionary<String,Object>, IDictionary<String,IDictionary<String,Object>>, Object) DropTable(String, IDictionary<String,Object>, IDictionary<String,IDictionary<String,Object>>, Object) DropTable(String, IDictionary<String,Object>, IDictionary<String,IDictionary<String,Object>>, Object)

Adds an operation to drop a table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

Equals(Object) Equals(Object) Equals(Object)
GetHashCode() GetHashCode() GetHashCode()
GetType() GetType() GetType()
MemberwiseClone() MemberwiseClone() MemberwiseClone()
MoveStoredProcedure(String, String, Object) MoveStoredProcedure(String, String, Object) MoveStoredProcedure(String, String, Object)

Adds an operation to move a stored procedure to a new schema.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

MoveTable(String, String, Object) MoveTable(String, String, Object) MoveTable(String, String, Object)

Adds an operation to move a table to a new schema.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

RenameColumn(String, String, String, Object) RenameColumn(String, String, String, Object) RenameColumn(String, String, String, Object)

Adds an operation to rename a column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

RenameIndex(String, String, String, Object) RenameIndex(String, String, String, Object) RenameIndex(String, String, String, Object)

Adds an operation to rename an index.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

RenameStoredProcedure(String, String, Object) RenameStoredProcedure(String, String, Object) RenameStoredProcedure(String, String, Object)

Adds an operation to rename a stored procedure. To change the schema of a stored procedure use MoveStoredProcedure

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

RenameTable(String, String, Object) RenameTable(String, String, Object) RenameTable(String, String, Object)

Adds an operation to rename a table. To change the schema of a table use MoveTable.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

Sql(String, Boolean, Object) Sql(String, Boolean, Object) Sql(String, Boolean, Object)

Adds an operation to execute a SQL command or set of SQL commands.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

SqlFile(String, Boolean, Object) SqlFile(String, Boolean, Object) SqlFile(String, Boolean, Object)

Adds an operation to execute a SQL file.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

SqlResource(String, Assembly, Boolean, Object) SqlResource(String, Assembly, Boolean, Object) SqlResource(String, Assembly, Boolean, Object)

Adds an operation to execute a SQL resource file.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

ToString() ToString() ToString()
Up() Up() Up()

Operations to be performed during the upgrade process.

Explicit Interface Implementations

IDbMigration.AddOperation(MigrationOperation) IDbMigration.AddOperation(MigrationOperation) IDbMigration.AddOperation(MigrationOperation)

Applies to