db+game: ship_systems table + starting ship seed (new game and v4 backfill step)

This commit is contained in:
2026-09-28 23:32:04 +00:00
parent c7580d92bd
commit 0910891995
5 changed files with 108 additions and 3 deletions
+9
View File
@@ -72,6 +72,15 @@ CREATE TABLE IF NOT EXISTS crew (
origin TEXT NOT NULL -- 'STARTING CREW' or '<planet>, <system>' for members found while exploring
);
CREATE TABLE IF NOT EXISTS ship_systems (
id INTEGER PRIMARY KEY AUTOINCREMENT,
save_id INTEGER NOT NULL REFERENCES saves(id),
type TEXT NOT NULL,
level INTEGER NOT NULL DEFAULT 0, -- 0 = not built yet ('built' is derived: level > 0)
capacity INTEGER NOT NULL DEFAULT 0,
UNIQUE (save_id, type)
);
CREATE TABLE IF NOT EXISTS events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
save_id INTEGER NOT NULL REFERENCES saves(id),