fix: update mock database schema to match conversation tracker queries
- Add missing columns: slug, model, conversation_count, total_messages, total_tokens, created_at, project_path - Fix test data insert to include all required columns Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -304,10 +304,12 @@ def mock_conversation_db(tmp_path, monkeypatch):
|
||||
CREATE TABLE conversations (
|
||||
session_id TEXT PRIMARY KEY,
|
||||
project_path TEXT,
|
||||
slug TEXT,
|
||||
started_at DATETIME,
|
||||
message_count INTEGER,
|
||||
total_input_tokens INTEGER DEFAULT 0,
|
||||
total_output_tokens INTEGER DEFAULT 0
|
||||
total_output_tokens INTEGER DEFAULT 0,
|
||||
model TEXT
|
||||
)
|
||||
""")
|
||||
conn.execute("""
|
||||
@@ -332,14 +334,19 @@ def mock_conversation_db(tmp_path, monkeypatch):
|
||||
CREATE TABLE daily_summaries (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
date TEXT UNIQUE NOT NULL,
|
||||
summary_content TEXT NOT NULL
|
||||
summary_content TEXT NOT NULL,
|
||||
conversation_count INTEGER DEFAULT 0,
|
||||
total_messages INTEGER DEFAULT 0,
|
||||
total_tokens INTEGER DEFAULT 0,
|
||||
created_at DATETIME,
|
||||
project_path TEXT
|
||||
)
|
||||
""")
|
||||
|
||||
# Insert test data
|
||||
conn.execute("""
|
||||
INSERT INTO conversations VALUES
|
||||
('test-session-id', '/test/project', '2026-04-19 10:00:00', 10, 1000, 500)
|
||||
('test-session-id', '/test/project', 'test-slug', '2026-04-19 10:00:00', 10, 1000, 500, 'claude-sonnet-4')
|
||||
""")
|
||||
conn.execute("""
|
||||
INSERT INTO messages VALUES
|
||||
|
||||
Reference in New Issue
Block a user