startup migrations and workflow fix

This commit is contained in:
2024-09-24 02:25:56 +02:00
Unverified
parent e786b3cc02
commit b4210180ff
2 changed files with 7 additions and 2 deletions

View File

@@ -36,6 +36,11 @@ public static class Program
.SetupApplication()
.Build();
using (IServiceScope scope = app.Services.CreateScope())
{
scope.ServiceProvider.GetService<DatabaseContext>().Database.Migrate();
}
if (app.Environment.IsDevelopment())
{
app.UseSwagger();