From 02b713cf81008561a69f88c4fcdf7fab4b423ff0 Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Thu, 9 Jul 2026 11:19:26 -0700 Subject: [PATCH] refactor(state): make thread history fields explicit --- .../thread_history_migrations/0001_thread_history.sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/codex-rs/state/thread_history_migrations/0001_thread_history.sql b/codex-rs/state/thread_history_migrations/0001_thread_history.sql index beede2d770..bbfc676861 100644 --- a/codex-rs/state/thread_history_migrations/0001_thread_history.sql +++ b/codex-rs/state/thread_history_migrations/0001_thread_history.sql @@ -2,7 +2,11 @@ CREATE TABLE thread_turns ( thread_id TEXT NOT NULL, turn_id TEXT NOT NULL, rollout_ordinal INTEGER NOT NULL, - metadata_json TEXT NOT NULL, + status TEXT NOT NULL, + error_json TEXT, + started_at INTEGER, + completed_at INTEGER, + duration_ms INTEGER, summary_first_user_item_id TEXT, summary_final_agent_item_id TEXT, PRIMARY KEY (thread_id, turn_id) @@ -16,7 +20,7 @@ CREATE TABLE thread_items ( turn_id TEXT, item_id TEXT NOT NULL, rollout_ordinal INTEGER NOT NULL, - materialized_thread_item_json TEXT NOT NULL, + item_json TEXT NOT NULL, PRIMARY KEY (thread_id, item_id) );