Files
hyungi_document_server/migrations/102_ask_events.sql
Hyungi Ahn 1beba3402b fix(migration): split 102 ask_events into single-statement files
asyncpg cannot insert multiple commands into a prepared statement.
102 = CREATE TABLE only, 103 = CREATE INDEX only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:52:26 +09:00

19 lines
503 B
SQL

CREATE TABLE IF NOT EXISTS ask_events (
id BIGSERIAL PRIMARY KEY,
query TEXT NOT NULL,
user_id BIGINT REFERENCES users(id),
completeness TEXT,
synthesis_status TEXT,
confidence TEXT,
refused BOOLEAN DEFAULT false,
classifier_verdict TEXT,
max_rerank_score REAL,
aggregate_score REAL,
hallucination_flags JSONB DEFAULT '[]',
evidence_count INT,
citation_count INT,
defense_layers JSONB,
total_ms INT,
created_at TIMESTAMPTZ DEFAULT now()
)