Fix migrations

This commit is contained in:
2026-05-10 03:27:32 +03:00
parent 4c82631733
commit a6f3180fd1
+4 -2
View File
@@ -34,8 +34,10 @@ app.UseSwaggerUI();
using (var scope = app.Services.CreateScope()) using (var scope = app.Services.CreateScope())
{ {
var dbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>(); var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
dbContext.Database.Migrate();
var retry = db.Database.CreateExecutionStrategy();
retry.Execute(db.Database.Migrate);
} }
//app.UseHttpsRedirection(); //app.UseHttpsRedirection();