Add multi-server blueprint collections and atomic launches

This commit is contained in:
2026-09-18 00:08:54 -04:00
parent 782c7c0bda
commit 989931a0f2
20 changed files with 868 additions and 50 deletions
+22
View File
@@ -361,6 +361,28 @@ CREATE TABLE IF NOT EXISTS server_launch_recipes (
blueprint_name TEXT
);
CREATE TABLE IF NOT EXISTS server_launch_collections (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
created_at TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS server_collection_members (
collection_id TEXT NOT NULL REFERENCES server_launch_collections(id) ON DELETE CASCADE,
deployment_id TEXT NOT NULL UNIQUE REFERENCES server_deployments(id) ON DELETE CASCADE,
position INTEGER NOT NULL,
PRIMARY KEY (collection_id, position)
);
CREATE TABLE IF NOT EXISTS server_collection_previews (
id TEXT PRIMARY KEY,
expires_at TEXT NOT NULL,
blueprint_name TEXT NOT NULL,
entries TEXT NOT NULL,
servers TEXT NOT NULL,
collection_id TEXT REFERENCES server_launch_collections(id) ON DELETE CASCADE
);
-- Persist state transitions atomically, including changes made by background workers.
-- Polls with unchanged status/error do not produce duplicate activity entries.
CREATE TABLE IF NOT EXISTS beta_events (