fix(core.db): 修复升级后webchat未正确迁移的问题 (#3745)

不是所有人都叫Astrbot

#3722
This commit is contained in:
Dt8333
2025-11-22 18:37:39 +08:00
committed by GitHub
parent 0260d430d1
commit b89d3f663c

View File

@@ -43,7 +43,7 @@ async def migrate_webchat_session(db_helper: BaseDatabase):
func.max(PlatformMessageHistory.updated_at).label("latest"),
)
.where(col(PlatformMessageHistory.platform_id) == "webchat")
.where(col(PlatformMessageHistory.sender_id) == "astrbot")
.where(col(PlatformMessageHistory.sender_id) != "bot")
.group_by(col(PlatformMessageHistory.user_id))
)