Files
PaperClipAI/packages/db/src/migrations/0324_aberrant_machine_man.sql
T

6 lines
488 B
SQL

ALTER TABLE "chat_voice_tool_calls" DROP CONSTRAINT IF EXISTS "chat_voice_tool_calls_tool_check";--> statement-breakpoint
DO $$ BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'chat_voice_tool_calls_tool_check' AND conrelid = 'chat_voice_tool_calls'::regclass) THEN
ALTER TABLE "chat_voice_tool_calls" ADD CONSTRAINT "chat_voice_tool_calls_tool_check" CHECK ("chat_voice_tool_calls"."tool" in ('submit_request', 'get_updates', 'answer_question'));
END IF;
END $$;