From fd0a08b92cb98c716d90979140b6aacf91a54a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E6=B3=BD=E6=B6=9B?= Date: Sun, 8 Mar 2026 00:20:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E9=BD=90=20conversations.is=5F?= =?UTF-8?q?pinned=20=E5=85=BC=E5=AE=B9=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/storage/postgres/manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/postgres/manager.py b/src/storage/postgres/manager.py index d8a20a2a..cd67c8e5 100644 --- a/src/storage/postgres/manager.py +++ b/src/storage/postgres/manager.py @@ -171,6 +171,7 @@ class PostgresManager(metaclass=SingletonMeta): "ALTER TABLE IF EXISTS skills ADD COLUMN IF NOT EXISTS tool_dependencies JSONB DEFAULT '[]'::jsonb", "ALTER TABLE IF EXISTS skills ADD COLUMN IF NOT EXISTS mcp_dependencies JSONB DEFAULT '[]'::jsonb", "ALTER TABLE IF EXISTS skills ADD COLUMN IF NOT EXISTS skill_dependencies JSONB DEFAULT '[]'::jsonb", + "ALTER TABLE IF EXISTS conversations ADD COLUMN IF NOT EXISTS is_pinned BOOLEAN NOT NULL DEFAULT FALSE", "ALTER TABLE IF EXISTS mcp_servers ADD COLUMN IF NOT EXISTS env JSONB", """ CREATE TABLE IF NOT EXISTS agent_runs ( @@ -192,6 +193,7 @@ class PostgresManager(metaclass=SingletonMeta): "CREATE INDEX IF NOT EXISTS idx_agent_runs_user_created ON agent_runs(user_id, created_at DESC)", "CREATE INDEX IF NOT EXISTS idx_agent_runs_thread_created ON agent_runs(thread_id, created_at DESC)", "CREATE INDEX IF NOT EXISTS idx_agent_runs_status_updated ON agent_runs(status, updated_at)", + "CREATE INDEX IF NOT EXISTS ix_conversations_is_pinned ON conversations(is_pinned)", ] async with self.async_engine.begin() as conn: for stmt in stmts: