From e8a36f033b5ee74c94cc1b60fb7b5563caa4c0a7 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 4 Feb 2026 23:05:08 -0600 Subject: [PATCH] refac --- .../versions/8452d01d26d7_add_chat_message_table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py b/backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py index 310df83f03..28b5340d77 100644 --- a/backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py +++ b/backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py @@ -88,10 +88,10 @@ def upgrade() -> None: sa.column("updated_at", sa.BigInteger()), ) - # Fetch all chats (excluding shared chats which contain 'shared' in id) + # Fetch all chats (excluding shared chats which have user_id starting with 'shared-') chats = conn.execute( sa.select(chat_table.c.id, chat_table.c.user_id, chat_table.c.chat).where( - ~chat_table.c.id.like("%shared%") + ~chat_table.c.user_id.like("shared-%") ) ).fetchall()