In development and while testing various things in EF6 core – I tend to end up with a lot of migration garbage which occasionally I have to take out. This is how it’s done #notetoself
- Delete all *. cs files in the Migrations Folder.
- Delete the _MigrationHistory Table in the Database
- Delete all database tables subject to the migration (take care of the data 🙂 ).
- Run dotnet ef migrations add Reset
- Run dotnet ef migrations list to get the full name of last migration
- Run dotnet ef database update [migration-name]
#notetoself