fix: seed production defaults and harden onboarding
This commit is contained in:
@@ -168,9 +168,12 @@ using (var scope = app.Services.CreateScope())
|
||||
await db.Database.MigrateAsync();
|
||||
await AppConfigDefaults.EnsureAsync(db);
|
||||
await scope.ServiceProvider.GetRequiredService<AdminBootstrapService>().EnsureAsync();
|
||||
if (app.Environment.IsDevelopment())
|
||||
await DbSeeder.SeedAsync(db);
|
||||
}
|
||||
// These records are runtime defaults, not development fixtures. Production
|
||||
// databases also need them for onboarding, category fallback and stickers.
|
||||
// DbSeeder only inserts into an empty catalog, so existing admin-managed
|
||||
// records are preserved.
|
||||
await DbSeeder.SeedAsync(db);
|
||||
}
|
||||
if (app.Environment.IsDevelopment())
|
||||
app.MapOpenApi();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user