qa iteration 2
This commit is contained in:
@@ -96,6 +96,21 @@ builder.TryAddStellaOpsLocalBinding("integrations");
|
||||
var app = builder.Build();
|
||||
app.LogStellaOpsLocalHostname("integrations");
|
||||
|
||||
// Auto-migrate: ensure integrations schema and tables exist on startup
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var db = scope.ServiceProvider.GetRequiredService<IntegrationDbContext>();
|
||||
try
|
||||
{
|
||||
await db.Database.EnsureCreatedAsync();
|
||||
app.Logger.LogInformation("Integrations database schema ensured");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
app.Logger.LogWarning(ex, "Integrations database EnsureCreated failed (may already exist)");
|
||||
}
|
||||
}
|
||||
|
||||
// Configure pipeline
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user