Files
ThothII/harness/tht/migrations/memory/004_archive_repairs.sql
T
Codex 82e2c91f42
Publish documentation / publish (push) Successful in 1m27s
feat: implement memory and evidence administration with guided repairs
Add PostgreSQL-backed memory, editable evidence with source review and activation, and human-approved archive repairs across the harness, API, and UI. Include migrations, deployment support, regression coverage, and validation documentation.

Refresh permissions from validated session roles so existing administrator logins can access newly deployed archive management features.
2026-09-10 10:31:34 +02:00

15 lines
703 B
SQL

CREATE TABLE thoth_memory.archive_repairs (
workspace_id text NOT NULL,
session_id text NOT NULL,
repair_id text NOT NULL,
data jsonb NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (workspace_id, session_id, repair_id)
);
ALTER TABLE thoth_memory.archive_repairs ENABLE ROW LEVEL SECURITY;
ALTER TABLE thoth_memory.archive_repairs FORCE ROW LEVEL SECURITY;
CREATE POLICY workspace_isolation ON thoth_memory.archive_repairs
USING (workspace_id = current_setting('thoth.memory_workspace', true))
WITH CHECK (workspace_id = current_setting('thoth.memory_workspace', true));
GRANT SELECT, INSERT, UPDATE ON thoth_memory.archive_repairs TO thoth_memory_runtime;