feat: add feature to speak with the AI and create report from contexts
This commit is contained in:
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS reports;
|
||||
@ -0,0 +1,9 @@
|
||||
CREATE TABLE reports (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
summary_id UUID REFERENCES summaries(id) ON DELETE SET NULL,
|
||||
context_excerpt TEXT NOT NULL,
|
||||
question TEXT NOT NULL,
|
||||
answer TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
@ -0,0 +1,4 @@
|
||||
ALTER TABLE reports
|
||||
DROP COLUMN IF EXISTS status,
|
||||
DROP COLUMN IF EXISTS error_msg,
|
||||
ALTER COLUMN answer DROP DEFAULT;
|
||||
@ -0,0 +1,4 @@
|
||||
ALTER TABLE reports
|
||||
ALTER COLUMN answer SET DEFAULT '',
|
||||
ADD COLUMN status VARCHAR(20) NOT NULL DEFAULT 'done',
|
||||
ADD COLUMN error_msg TEXT NOT NULL DEFAULT '';
|
||||
Reference in New Issue
Block a user