Task #1678: 修复_init_db()确保新表包含reply_status和fail_count字段
This commit is contained in:
+4
-2
@@ -297,14 +297,16 @@ class MessageHistory:
|
||||
conn = sqlite3.connect(self.db_path, check_same_thread=False)
|
||||
conn.execute("PRAGMA journal_mode=WAL")
|
||||
|
||||
# 1. 用户消息原文表
|
||||
# 1. 用户消息原文表(含回复状态和失败计数)
|
||||
conn.execute("""
|
||||
CREATE TABLE IF NOT EXISTS user_messages (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
platform TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
reply_status INTEGER DEFAULT 1,
|
||||
fail_count INTEGER DEFAULT 0
|
||||
)
|
||||
""")
|
||||
conn.execute("""
|
||||
|
||||
Reference in New Issue
Block a user