You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document where to place code for applying migrations at runtime #2369
If you understand the security risks of using a connection string with permissions to alter the database schema and you understand problems that can occur when multiple instances of your app try to migrate the database at the same time...
You can do it in Program.Main. If you're using Microsoft.Extensions.Hosting, it would look like this:
Activity
bricelam commentedon May 8, 2020
If you understand the security risks of using a connection string with permissions to alter the database schema and you understand problems that can occur when multiple instances of your app try to migrate the database at the same time...
You can do it in Program.Main. If you're using Microsoft.Extensions.Hosting, it would look like this:
You could also consider adding an admin page that requires the user to be authenticated before clicking a button to migrate the database.
Improvements to migration docs (#2430)