Reputation: 1737
I am trying to figure out the commandline line params for the EF5 migrate.exe that will allow me to manually roll back the latest code-first migration - i.e. to apply the Down() function in the latest DbMigration.
NB I have migrate.exe working - I can apply the Up() function - but I don't see any documentation about rollback on the migrate.exe help page: http://msdn.microsoft.com/en-us/data/jj618307.aspx
Anyone know whether this is possible?
Upvotes: 3
Views: 1675
Reputation: 364249
Use targetMigration
parameter and set it to name of the migration you want to end with. If it is old migration the tool should revert all migrations applied after your selected migration. At least this is how it works in powershell commands.
Upvotes: 4