revert 37d4dce036
Some checks failed
.NET Docker Build & Push / build_and_push (push) Has been cancelled
Some checks failed
.NET Docker Build & Push / build_and_push (push) Has been cancelled
revert Added Auto Migrations to startup
This commit is contained in:
@@ -64,10 +64,6 @@ using (var scope = app.Services.CreateScope())
|
|||||||
var roleManager = scope.ServiceProvider.GetRequiredService<RoleManager<IdentityRole>>();
|
var roleManager = scope.ServiceProvider.GetRequiredService<RoleManager<IdentityRole>>();
|
||||||
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
||||||
|
|
||||||
var CouchLogDB = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
|
|
||||||
|
|
||||||
CouchLogDB.Database.Migrate();
|
|
||||||
|
|
||||||
string[] roleNames = { "Admin", "User" };
|
string[] roleNames = { "Admin", "User" };
|
||||||
IdentityResult roleResult;
|
IdentityResult roleResult;
|
||||||
|
|
||||||
@@ -124,6 +120,8 @@ using (var scope = app.Services.CreateScope())
|
|||||||
await userManager.AddToRoleAsync(adminUser, "Admin");
|
await userManager.AddToRoleAsync(adminUser, "Admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var CouchLogDB = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
|
||||||
|
|
||||||
MediaType mediaType = new()
|
MediaType mediaType = new()
|
||||||
{
|
{
|
||||||
Name = "Movie"
|
Name = "Movie"
|
||||||
|
|||||||
Reference in New Issue
Block a user