Extracted from uncaged monorepo (oc-xiaoju/uncaged). Resolves oc-xiaoju/uncaged#224. - @uncaged/ograph: CF Worker engine (events, projections, reactions) - @uncaged/ograph-cli: CLI for managing OGraph instances - Removed @uncaged/oid dependency (unused) - 116 tests, all passing - CI: GitHub Actions 小橘 🍊(NEKO Team)
16 lines
530 B
SQL
16 lines
530 B
SQL
CREATE TABLE IF NOT EXISTS reaction_logs (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
reaction_id INTEGER NOT NULL,
|
|
trigger_event_id INTEGER NOT NULL,
|
|
projection_def TEXT NOT NULL,
|
|
old_value TEXT,
|
|
new_value TEXT,
|
|
action TEXT NOT NULL,
|
|
status TEXT NOT NULL,
|
|
handler_output TEXT,
|
|
duration_ms INTEGER,
|
|
created_at INTEGER NOT NULL DEFAULT (unixepoch() * 1000)
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_rlog_reaction ON reaction_logs(reaction_id);
|
|
CREATE INDEX IF NOT EXISTS idx_rlog_event ON reaction_logs(trigger_event_id);
|