fix(orchestrator): scripts auto-migration with dedicated options and DI module
Scripts module now owns its PostgreSQL schema lifecycle: ScriptsPostgresOptions, ServiceCollectionExtensions.AddReleaseOrchestratorScripts(), embedded SQL migration, and MigrationServiceExtensions fix to register multiple IHostedService migrations without deduplication. Fresh installs auto-converge the scripts catalog without depending on Scheduler-owned bootstrap SQL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,9 @@ public static class MigrationServiceExtensions
|
||||
var migrationOptions = new StartupMigrationOptions();
|
||||
configureOptions?.Invoke(migrationOptions);
|
||||
|
||||
services.AddHostedService(sp =>
|
||||
// Multiple modules can own distinct schemas inside one service host.
|
||||
// Register each migration host explicitly so they do not get deduplicated.
|
||||
services.AddSingleton<IHostedService>(sp =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptions<TOptions>>().Value;
|
||||
var connectionString = connectionStringSelector(options);
|
||||
|
||||
Reference in New Issue
Block a user