This commit is contained in:
丹尼尔
2026-03-12 11:52:04 +08:00
parent 30a57d993c
commit bdba4ec071
19 changed files with 5690 additions and 191 deletions

View File

@@ -89,6 +89,17 @@ def init_schema(conn: sqlite3.Connection) -> None:
)
""")
cur.execute("CREATE INDEX IF NOT EXISTS idx_sync_messages_key ON sync_messages(key)")
# 回调原始 body 落库,便于回溯与统计
cur.execute("""
CREATE TABLE IF NOT EXISTS callback_log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key TEXT NOT NULL,
received_at TEXT NOT NULL,
raw_body TEXT
)
""")
cur.execute("CREATE INDEX IF NOT EXISTS idx_callback_log_key ON callback_log(key)")
cur.execute("CREATE INDEX IF NOT EXISTS idx_callback_log_received ON callback_log(received_at)")
# 模型配置
cur.execute("""
CREATE TABLE IF NOT EXISTS models (