forked from SoDOff-Project/sodoff
Revert "remove EnsureCreated to use ef migrations"
This reverts commit bfadf060b526fb3373871909b0613711ee8974f2.
This commit is contained in:
parent
bfadf060b5
commit
856236caa5
@ -63,6 +63,8 @@ var app = builder.Build();
|
|||||||
|
|
||||||
using var scope = app.Services.CreateScope();
|
using var scope = app.Services.CreateScope();
|
||||||
|
|
||||||
|
scope.ServiceProvider.GetRequiredService<DBContext>().Database.EnsureCreated();
|
||||||
|
|
||||||
// ensure any new migrations are applied
|
// ensure any new migrations are applied
|
||||||
var migrations = scope.ServiceProvider.GetRequiredService<DBContext>().Database.GetPendingMigrations();
|
var migrations = scope.ServiceProvider.GetRequiredService<DBContext>().Database.GetPendingMigrations();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user