qa iteration 2

This commit is contained in:
master
2026-03-06 00:40:59 +02:00
parent 360485f556
commit 54753bfd41
5 changed files with 44 additions and 1 deletions

View File

@@ -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())
{