log recommendations

This commit is contained in:
Danel Kungla
2025-09-23 10:50:20 +03:00
parent fee8534fcc
commit 3dd82902fe
3 changed files with 21 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
ALTER TABLE medreport.ai_responses ENABLE ROW LEVEL SECURITY;
CREATE POLICY "ai_responses_select" ON medreport.ai_responses FOR SELECT TO authenticated USING (true);
CREATE POLICY "ai_responses_insert" ON medreport.ai_responses FOR INSERT TO authenticated WITH CHECK (true);
grant select, insert, update, delete on table medreport.ai_responses to authenticated;
ALTER TABLE medreport.ai_responses
ALTER COLUMN prompt_id TYPE text
USING prompt_name::text;
ALTER TABLE medreport.ai_responses
ALTER COLUMN prompt_name TYPE text
USING prompt_name::text;
ALTER TABLE medreport.ai_responses
ADD CONSTRAINT ai_responses_id_pkey PRIMARY KEY (id);