After releasing my application to the server, I like now to make some update on my database (on the server).
In my application I'm using DbContext
(IIdentitycore) then with Nuget manager console generate migration then make update-database
, so the database in local is updated.
But now how to apply this update to my database on the server? Is there any why to generate an update SQL query?
I'm using .NET 6 and SQL Server Express.
Thank you
You can generate migration scripts using Powershell or CLI commands:
Script-Migration
dotnet ef migrations script
Or by generating bundle executable file or just applying migrations at runtime at the start of the app.