为 用户-对话 关联表添加索引

This commit is contained in:
CrescentLeaf
2025-11-21 23:15:11 +08:00
parent 48382c4592
commit b976fed8e7

View File

@@ -15,6 +15,8 @@ export default class UserChatLinker {
/* Chat ID */ chat_id TEXT NOT NULL /* Chat ID */ chat_id TEXT NOT NULL
); );
`) `)
db.exec(`CREATE INDEX IF NOT EXISTS idx_chat_id ON UserChatLinker(chat_id);`)
db.exec(`CREATE INDEX IF NOT EXISTS idx_user_id ON UserChatLinker(user_id);`)
return db return db
} }