fix config

This commit is contained in:
2026-09-12 19:41:13 -04:00
parent b86b3d5cc1
commit bb1e5c6a95
2 changed files with 34 additions and 21 deletions
+3 -4
View File
@@ -45,10 +45,9 @@ CREATE TABLE IF NOT EXISTS scripts (
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now'))
);
CREATE INDEX IF NOT EXISTS idx_scripts_scope ON scripts(scope_type, scope_value);
CREATE INDEX IF NOT EXISTS idx_scripts_kind ON scripts(kind);
-- At most one baseline per (scope_type, scope_value). Partial unique index.
CREATE UNIQUE INDEX IF NOT EXISTS idx_scripts_one_baseline_per_scope
ON scripts(scope_type, scope_value) WHERE kind = 'baseline';
-- kind-referencing indexes are created in db/index.ts AFTER migrateTable adds
-- the column to legacy DBs. Putting them here would fail with "no such column:
-- kind" on an existing pre-kind DB, breaking boot.
CREATE TABLE IF NOT EXISTS script_versions (
id INTEGER PRIMARY KEY AUTOINCREMENT,