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())
|
||||
{
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
dbContext.Database.Migrate();
|
||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
|
||||
var retry = db.Database.CreateExecutionStrategy();
|
||||
retry.Execute(db.Database.Migrate);
|
||||
}
|
||||
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
Reference in New Issue
Block a user