runs: per-story state, prisoners and boutique interleaved
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
-- canonical dump of db/memory.db — GENERATED by tool/memory.mjs; do not edit.
|
||||
-- one row per line; entries and events ordered by id; restore with: restore
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS entries (
|
||||
id INTEGER PRIMARY KEY,
|
||||
ring TEXT NOT NULL CHECK (ring IN ('a', 'b', 'cold')),
|
||||
type TEXT NOT NULL CHECK (type IN ('place', 'person', 'fact', 'thread')),
|
||||
label TEXT NOT NULL,
|
||||
detail TEXT NOT NULL DEFAULT '',
|
||||
created TEXT NOT NULL,
|
||||
last_touched TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS entries_ring_touch
|
||||
ON entries (ring, last_touched DESC, id DESC);
|
||||
|
||||
-- append-only audit journal; nothing here is ever updated or deleted
|
||||
CREATE TABLE IF NOT EXISTS events (
|
||||
id INTEGER PRIMARY KEY,
|
||||
window TEXT NOT NULL,
|
||||
op TEXT NOT NULL CHECK (op IN ('insert', 'touch', 'promote', 'demote', 'reword', 'delete', 'evict', 'revive')),
|
||||
entry_id INTEGER NOT NULL REFERENCES entries (id),
|
||||
reason TEXT NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS events_window ON events (window);
|
||||
BEGIN TRANSACTION;
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user