0

Using code first migrations it is trivial to migrate to any given migration by using -TargetMigration [MigrationName].

But how do you rollback to before the first migration? What migration do you target for that? The first migration has a Down() just like the rest and the logic is sound - but how do I get it to execute via a update-database command?

Shumii
  • 4,529
  • 5
  • 32
  • 41

1 Answers1

0

Use this command:

Update-Database -Target 0
Lukas Kabrt
  • 5,441
  • 4
  • 43
  • 58