mirror of
https://github.com/ryzij/URL-Shortener.git
synced 2026-07-14 03:56:58 +00:00
Fix migrations
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user