OpenChatAI / OpenAIChatAssistant /migrations /alter_conversations.sql
BarBar288's picture
Upload 122 files
27127dd verified
raw
history blame contribute delete
308 Bytes
-- Add user_id column to conversations table
ALTER TABLE "conversations"
ADD COLUMN "user_id" integer;
-- Add foreign key constraint
ALTER TABLE "conversations"
ADD CONSTRAINT "conversations_user_id_users_id_fk"
FOREIGN KEY ("user_id")
REFERENCES "users"("id")
ON DELETE no action
ON UPDATE no action;