Describe what is not working as expected.
If I attempt to run a dotnet ef database update -migration NameOfMigration and it would result in dataloss (i.e it wants to perform a Down action), action should be cancelled to prevent possible accidental dataloss.
Suggestion:
Instead introduce a dotnet ef database rollback command specifically for rolling back migrations.
This is how some other db management tools work, like ActiveRecord in rails.
This is especially useful as there appears to be no CLI tool to check the current DB migration version, based on the _Migrations table that is updated by EF. Checking the current DB version at the moment requires I open a new code window, set syntax to SQL, connect to the DB and issue the select command to the appropriately named table
Describe what is not working as expected. If I attempt to run a
dotnet ef database update -migration NameOfMigration
and it would result in dataloss (i.e it wants to perform a Down action), action should be cancelled to prevent possible accidental dataloss. Suggestion:Instead introduce a
dotnet ef database rollback
command specifically for rolling back migrations.This is how some other db management tools work, like ActiveRecord in rails. This is especially useful as there appears to be no CLI tool to check the current DB migration version, based on the _Migrations table that is updated by EF. Checking the current DB version at the moment requires I open a new code window, set syntax to SQL, connect to the DB and issue the
select
command to the appropriately named tableFurther technical details
EF Core version: Entity Framework Core .NET Command-line Tools, 2.2.4-servicing-10062 Database Provider: Microsoft.EntityFrameworkCore.SqlServer Operating system: macOS 10.14.5 IDE: Code + Terminal