Publish documentation / publish (push) Successful in 1m27s
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.
30 lines
1.3 KiB
SQL
30 lines
1.3 KiB
SQL
CREATE TABLE thoth_memory.reviews (
|
|
workspace_id text NOT NULL,
|
|
session_id text NOT NULL,
|
|
summary_id text NOT NULL,
|
|
request_hash text NOT NULL,
|
|
result jsonb NOT NULL,
|
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
PRIMARY KEY (workspace_id, session_id, summary_id)
|
|
);
|
|
ALTER TABLE thoth_memory.reviews ENABLE ROW LEVEL SECURITY;
|
|
ALTER TABLE thoth_memory.reviews FORCE ROW LEVEL SECURITY;
|
|
CREATE POLICY workspace_isolation ON thoth_memory.reviews
|
|
USING (workspace_id = current_setting('thoth.memory_workspace', true))
|
|
WITH CHECK (workspace_id = current_setting('thoth.memory_workspace', true));
|
|
GRANT SELECT, INSERT ON thoth_memory.reviews TO thoth_memory_runtime;
|
|
|
|
CREATE TABLE thoth_memory.cleanup_receipts (
|
|
workspace_id text NOT NULL,
|
|
sync_id text NOT NULL,
|
|
request_hash text NOT NULL,
|
|
card_ids jsonb NOT NULL,
|
|
PRIMARY KEY (workspace_id, sync_id)
|
|
);
|
|
ALTER TABLE thoth_memory.cleanup_receipts ENABLE ROW LEVEL SECURITY;
|
|
ALTER TABLE thoth_memory.cleanup_receipts FORCE ROW LEVEL SECURITY;
|
|
CREATE POLICY workspace_isolation ON thoth_memory.cleanup_receipts
|
|
USING (workspace_id = current_setting('thoth.memory_workspace', true))
|
|
WITH CHECK (workspace_id = current_setting('thoth.memory_workspace', true));
|
|
GRANT SELECT, INSERT ON thoth_memory.cleanup_receipts TO thoth_memory_runtime;
|