Update release notes and deploy workspace
This commit is contained in:
@@ -47,17 +47,11 @@ public static class WebApplicationExtensions
|
||||
await db.Database.MigrateAsync();
|
||||
}
|
||||
|
||||
await SessionBootstrapper.EnsureAsync(db);
|
||||
await OperationalTablesBootstrapper.EnsureAsync(db);
|
||||
await TeamAccountBootstrapper.EnsureAsync(db, app.Configuration);
|
||||
if (ShouldSeedPresentationData(app))
|
||||
{
|
||||
await SeedDataBootstrapper.EnsureAsync(db);
|
||||
}
|
||||
}
|
||||
catch (Exception error)
|
||||
{
|
||||
logger.LogError(error, "Database initialization failed. Check the PostgreSQL connection, migrations, and seed data.");
|
||||
logger.LogError(error, "Database initialization failed. Check the PostgreSQL connection, migrations, and startup configuration.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -69,17 +63,4 @@ public static class WebApplicationExtensions
|
||||
app.MapPublicEndpoints();
|
||||
app.MapAdminEndpoints();
|
||||
}
|
||||
|
||||
private static bool ShouldSeedPresentationData(WebApplication app)
|
||||
{
|
||||
var mode = app.Configuration["VTSA_SEED_MODE"]
|
||||
?? app.Configuration["SeedData:Mode"];
|
||||
|
||||
if (string.IsNullOrWhiteSpace(mode))
|
||||
{
|
||||
return app.Environment.IsDevelopment();
|
||||
}
|
||||
|
||||
return mode.Trim().ToLowerInvariant() is "demo" or "presentation" or "sample";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user