Reset Entity-Framework Migrations

You need to delete the state:

  1. Delete the migrations folder in your project
  2. Delete the __MigrationHistory table in your database (may be under system tables)

Then run the following command in the Package Manager Console:

Enable-Migrations -EnableAutomaticMigrations -Force

 

Use with or without -EnableAutomaticMigrations

And finally, you can run:

Add-Migration Initial

 

你可能感兴趣的:(Reset Entity-Framework Migrations)