Is it possible to revert database migrations on N steps back, like,
"revert 2 migrations back"
I found in the docs that we can pass parameter '0' which will revert a database to clean state.
dotnet ef database update 0
I am looking for something similar to:
dotnet ef database update -2
I know, that I can do this using migration's name. But I find that sometimes much easier just enter a number, than copy/paste migration name
In package manager console, you can run the following command to rollback the migrations in your database:
Then to the remove the migrations you can run the command
Remove-Migration in PMC to remove the penultimate migration. Run this as many times to remove the migrations, e.g. run twice to remove the last 2 migrations. This command will also updated your