better-chatbot / src /lib /db /migrations /pg /0001_slimy_tarot.sql
Bot
Initial commit for HF Spaces
05c5ed5
Raw
History Blame Contribute Delete
682 Bytes
CREATE TABLE IF NOT EXISTS "mcp_server_binding" (
"owner_type" text NOT NULL,
"owner_id" uuid NOT NULL,
"config" jsonb DEFAULT '{}'::jsonb NOT NULL,
"created_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
"updated_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
CONSTRAINT "mcp_server_binding_owner_type_owner_id_pk" PRIMARY KEY("owner_type","owner_id")
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "chat_message" ADD CONSTRAINT "chat_message_thread_id_chat_thread_id_fk" FOREIGN KEY ("thread_id") REFERENCES "public"."chat_thread"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint