working on redundancy

This commit is contained in:
2026-03-06 16:37:31 -07:00
parent 8059048db2
commit 181c6ca84b
16 changed files with 282 additions and 29 deletions

View File

@@ -6,13 +6,12 @@ CREATE TABLE conversations (
);
CREATE TABLE messages (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
id BIGSERIAL PRIMARY KEY,
conversation_id UUID NOT NULL REFERENCES conversations(id) ON DELETE CASCADE,
role TEXT NOT NULL CHECK (role IN ('user', 'assistant', 'tool')),
content TEXT,
reasoning_content TEXT,
tool_calls JSONB,
tool_call_id TEXT,
position INTEGER NOT NULL,
inserted_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);