-- 聊天记录去重索引
CREATE UNIQUE INDEX IF NOT EXISTS idx_chat_records_message_id
    ON chat_records (message_id) WHERE message_id != '';
