In Net Core 3.0:
I was not able to find a way to Reset Migrations.
I also ran into problems with broken migrations, and the answers provided here didn't work for me. I have a .Net Core 3.0 web API, and somewhere in the last month I edited the database directly. Yes, I did a bad, bad thing.
Strategies suggested here resulted in a number of errors in Package Manager Console:
- A migration of that name already exists
- Could not find the snapshot
- 'Force' is not a recognized parameter
Granted, I may have missed a step or missed clearing out the correct files, but I found that there are ways to clean this up without as much brute force:
- Remove-Migration from the PMC for each migration by name, in reverse order of creation, up to and including the broken migration
- Add-Migration to create a new migration which will be the delta between the last good migration up to the current schema
Now when the web API is started with an empty database, it correctly creates all the tables and properties to match the entity models.
HTH!