17 lines
764 B
SQL
17 lines
764 B
SQL
-- Private main-Agent conversations; no public feed or administrator bypass.
|
|
CREATE TABLE IF NOT EXISTS eddy_conversation_events (
|
|
id text PRIMARY KEY,
|
|
sequence bigserial NOT NULL UNIQUE,
|
|
owner text NOT NULL,
|
|
machine text NOT NULL,
|
|
task_id text NOT NULL,
|
|
task_title text NOT NULL,
|
|
source_id text NOT NULL,
|
|
provider text NOT NULL,
|
|
event text NOT NULL,
|
|
received_at bigint NOT NULL
|
|
);
|
|
CREATE INDEX IF NOT EXISTS eddy_conversations_owner_sequence ON eddy_conversation_events (owner, sequence);
|
|
CREATE INDEX IF NOT EXISTS eddy_conversations_task_sequence ON eddy_conversation_events (owner, task_id, sequence);
|
|
CREATE INDEX IF NOT EXISTS eddy_conversations_source_sequence ON eddy_conversation_events (owner, machine, task_id, source_id, sequence);
|