I am trying to figure out how to run a specific migration from the package manager in nuget.
I have tried to run:
update-database -TargetMigration test3
For EF Core 3.1 via Package Manager Console:
dotnet ef database update YourMigrationName
The best answer given by Dmitry is a bit incorrect.
There's no parameter -Target
. The only parameter that can be applied is -Migration
.
Therefore, the right answer is:
Update-Database -Migration test32
According to EF Core Docs, correct parameter name is -Target
(for EF Core 1.1) or -Migration
(for EF Core 2.0)
so in your case:
update-database -target test32
or
update-database -migration test32
"Modern" way is to use "regular" command prompt and .NET Core CLI, and command like dotnet ef database update <target>