What is the reverse for Update-Database (used in Package Manager Console)?

entity-framework nuget nuget-package

Question

I have been changing my domain classes and executed Update-Database in the Package Manager Console, After i realized that need to add an index and need to down-grade to the previous state. what is the proper command to down-grade one step in migration?

1
19
11/16/2013 4:37:18 PM

Accepted Answer

Update-Database has a TargetMigration parameter that you can use to update to a particular migration. You can use that to upgrade or downgrade.

Update-Database –TargetMigration PreviousMigrationName
30
11/16/2013 6:33:44 PM

Popular Answer

Update-Database –TargetMigration "lastcreatedMigrationName"

example:

update-database -targetmigration: "entity-logs-index"


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow