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 (
|
CREATE TABLE conversations (
|
||||||
session_id TEXT PRIMARY KEY,
|
session_id TEXT PRIMARY KEY,
|
||||||
project_path TEXT,
|
project_path TEXT,
|
||||||
|
slug TEXT,
|
||||||
started_at DATETIME,
|
started_at DATETIME,
|
||||||
message_count INTEGER,
|
message_count INTEGER,
|
||||||
total_input_tokens INTEGER DEFAULT 0,
|
total_input_tokens INTEGER DEFAULT 0,
|
||||||
total_output_tokens INTEGER DEFAULT 0
|
total_output_tokens INTEGER DEFAULT 0,
|
||||||
|
model TEXT
|
||||||
)
|
)
|
||||||
""")
|
""")
|
||||||
conn.execute("""
|
conn.execute("""
|
||||||
@@ -332,14 +334,19 @@ def mock_conversation_db(tmp_path, monkeypatch):
|
|||||||
CREATE TABLE daily_summaries (
|
CREATE TABLE daily_summaries (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
date TEXT UNIQUE NOT NULL,
|
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
|
# Insert test data
|
||||||
conn.execute("""
|
conn.execute("""
|
||||||
INSERT INTO conversations VALUES
|
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("""
|
conn.execute("""
|
||||||
INSERT INTO messages VALUES
|
INSERT INTO messages VALUES
|
||||||
|
|||||||
Reference in New Issue
Block a user