Export (0) Print
Expand All

DbMigration Class

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Represents the 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.

System.Object
  System.Data.Entity.Migrations.DbMigration

Namespace:  System.Data.Entity.Migrations
Assembly:  EntityFramework (in EntityFramework.dll)

public abstract class DbMigration : IDbMigration

The DbMigration type exposes the following members.

  NameDescription
Protected methodDbMigrationInitializes a new instance of the DbMigration class.
Top

  NameDescription
Protected methodAddColumnAdds 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.
Protected methodAddForeignKey(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.
Protected methodAddForeignKey(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.
Protected methodAddPrimaryKey(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.
Protected methodAddPrimaryKey(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.
Protected methodAlterColumnAdds 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.
Public methodAlterStoredProcedure(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.
Public methodAlterStoredProcedure<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.
Protected methodAlterTableAnnotations<TColumns>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.
Protected methodCreateIndex(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.
Protected methodCreateIndex(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.
Public methodCreateStoredProcedure(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.
Public methodCreateStoredProcedure<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.
Protected methodCreateTable<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.
Protected methodCreateTable<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.
Public methodDownOperations to be performed during the downgrade process.
Protected methodDropColumn(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.
Protected methodDropColumn(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.
Protected methodDropForeignKey(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.
Protected methodDropForeignKey(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.
Protected methodDropForeignKey(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.
Protected methodDropForeignKey(String, String, String, String, Object) Obsolete. 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.
Protected methodDropIndex(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.
Protected methodDropIndex(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.
Protected methodDropPrimaryKey(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.
Protected methodDropPrimaryKey(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.
Public methodDropStoredProcedureAdds 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.
Protected methodDropTable(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.
Protected methodDropTable(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.
Protected methodDropTable(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.
Protected methodDropTable(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.
Public methodEqualsDetermines whether this instance is equal to a specified object. (Overrides Object.Equals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCodeReturns the hash function for the current object. (Overrides Object.GetHashCode().)
Public methodGetTypeReturns the runtime type of the current instance.
Protected methodMemberwiseCloneCreates a shallow copy of the current object.
Protected methodMoveStoredProcedureAdds 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.
Protected methodMoveTableAdds 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.
Protected methodRenameColumnAdds 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.
Protected methodRenameIndexAdds 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.
Protected methodRenameStoredProcedureAdds 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.
Protected methodRenameTableAdds 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.
Protected methodSqlAdds an operation to execute a SQL command. 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.
Protected methodSqlFileAdds 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.
Protected methodSqlResourceAdds 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.
Public methodToStringReturns a string that represents the current object. (Overrides Object.ToString().)
Public methodUpOperations to be performed during the upgrade process.
Top

  NameDescription
Explicit interface implemetationPrivate methodIDbMigration.AddOperationAdds a migration operation.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft