db startup
All checks were successful
CI/CD Pipeline / build (push) Successful in 11s

This commit is contained in:
2026-03-09 15:12:10 -06:00
parent ff48786d24
commit 25be2e5210
3 changed files with 15 additions and 2 deletions

View File

@@ -1,11 +1,11 @@
CREATE TABLE conversations (
CREATE TABLE IF NOT EXISTS conversations (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL UNIQUE,
inserted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE TABLE messages (
CREATE TABLE IF NOT EXISTS messages (
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')),