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>
19 lines
503 B
SQL
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()
|
|
)
|