10 lines
469 B
SQL
10 lines
469 B
SQL
-- Admission history intentionally survives conversation/source deletion. It
|
|
-- contains opaque identifiers and timestamps only, never questions or answers.
|
|
CREATE TABLE summary_qa_provider_calls (
|
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
turn_id UUID NOT NULL,
|
|
started_at TIMESTAMPTZ NOT NULL,
|
|
PRIMARY KEY(user_id,turn_id)
|
|
);
|
|
CREATE INDEX summary_qa_provider_calls_window_idx ON summary_qa_provider_calls(user_id,started_at DESC);
|