Deploying ASP.NET on remote machine
Hello, I've ran dotnet publish and got the files to put on my machine, however I'm not sure what is the correct way to run migrations on the remote machine, if someone can point me in the right direction
3 Replies
I'm using EF Core
you can generate an ef core deployment package which can apply the migrations. You can also generate sql scripts that can apply your migration, then run those with whatever db management software you normally use.
Alternatively, you can have the application apply the migrations on startup by calling
ctx.Database.Migrate()
(or something like that)thank you