refactor: make provisioning own instance lifecycle operations

This commit is contained in:
2026-09-27 14:45:00 -04:00
parent cfed584614
commit df265d1900
44 changed files with 1791 additions and 1609 deletions
+10
View File
@@ -441,6 +441,16 @@ CREATE TABLE IF NOT EXISTS server_rebuild_jobs (
removed_at TEXT
);
-- Stable links from consumers to lifecycle jobs. Sources survive their caller's
-- history retention, while current pointers live on the caller's server rows.
CREATE TABLE IF NOT EXISTS provisioning_sources (
operation_id TEXT NOT NULL REFERENCES server_deployments(id) ON DELETE CASCADE,
kind TEXT NOT NULL CHECK (kind IN ('campaign','beta','maintenance')),
source_id TEXT NOT NULL,
server TEXT NOT NULL,
PRIMARY KEY (operation_id, kind, source_id, server)
);
-- Blueprints retain map/count selections only. The legacy column name remains
-- compatible with older snapshot-based definitions, read as selections at runtime.
CREATE TABLE IF NOT EXISTS server_blueprints (