Can't perform migrations on production server.
Command "dotnet ef database update" works on my computer but fails on production
Steps i tried are:
1. Fill in checkbox
execute code first migrations in Visual Studio before publish.
dotnet ef database update not working . I installed .NET SDK but it doesn't have libraries needed.
Any suggestions appeciated.
There are a couple options:
dotnet ef migrations scriptand run it on your production database.
dbContext.Database.Migrate()at runtime during application startup (but be careful when running multiple apps/database clients)
Also, in the next release (1.0.0-preview3) of
Microsoft.EntityFrameworkCore.Tools, we'll be shipping
ef.exe which you can point directly to assemblies (instead of
project.json files) to perform migrations.