aspnetboilerplate icon indicating copy to clipboard operation
aspnetboilerplate copied to clipboard

Auto-run migration

Open rjs123431 opened this issue 1 year ago • 1 comments

Right now, then deploying the project I need to run the .Migrator.exe and would like to run the migrations automatically. Where is the best area in the code to call the MultiTenantMigrateExecuter.Run()?

Thank you.

rjs123431 avatar Jul 30 '24 14:07 rjs123431

@rjs123431 we were using this approach in our templates in the past but Microsoft now suggests running migrations outside of your app. But, you can still execute it in your project, please take a look at https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli

ismcagdas avatar Jul 31 '24 06:07 ismcagdas