From 972ae502ac07ebd9128a6c4828e18caaf64f1529 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 1 Apr 2026 16:23:21 +0200 Subject: [PATCH] fix: reference projects(guid) not projects(id) in chat_histories FK --- migrations/018_chat_histories.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/018_chat_histories.sql b/migrations/018_chat_histories.sql index fbe3b28..b9836e7 100644 --- a/migrations/018_chat_histories.sql +++ b/migrations/018_chat_histories.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS chat_histories ( title TEXT, channel TEXT, agent_id TEXT, - project_id UUID REFERENCES projects(id) ON DELETE SET NULL, + project_id UUID REFERENCES projects(guid) ON DELETE SET NULL, messages JSONB NOT NULL DEFAULT '[]', summary TEXT, metadata JSONB NOT NULL DEFAULT '{}',