added database migrations

This commit is contained in:
Sarah Faey 2022-11-22 22:37:24 +01:00
parent 17d8983fb0
commit f4cf2620d9
6 changed files with 1897 additions and 3 deletions

View file

@ -101,7 +101,7 @@ using (var scope = app.Services.CreateScope())
var services = scope.ServiceProvider;
var context = services.GetRequiredService<LiebContext>();
context.Database.EnsureCreated();
context.Database.Migrate();
DbInitializer.Initialize(context);
}