I have to revert the last EF Core migration from a productive instance from a SQL Server 2016 with no Visual Studio installed. How to do this?
Note: I already tried to install .NET SDK on the server but nevertheless it does not know the command dotnet ef
. Executing the command results in
No executable found matching command "dotnet-ef"
You can generate the SQL script to revert a migration using the Script-Migration
or dotnet ef migrations script
command.
dotnet ef migrations script TheAppliedMigration TheMigrationBeforeIt -o revert.sql