codex/codex-rs/state/migrations
joeytrasatti-openai 9d88e9ae08 Rename thread artifacts to attachments in the state database (#43927)
## What changed

Add a migration that renames `thread_artifacts` to `thread_attachments` and
`artifact_type` to `attachment_type`, and recreates the thread lookup index
under the attachment name.

## Testing

Extend the migration test to verify that existing attachment data survives the
rename, section metadata is preserved, and the version 50 migrator tolerates
the updated database with `ignore_missing` enabled.

GitOrigin-RevId: 43955c4f69b91f92217efc1dc8e6a551d0716059
History 2026-09-08 22:02:55 +00:00
..
0001_threads.sql feat: sqlite 1 (#10004) 2026-01-28 15:29:14 +01:00
0002_logs.sql chore: unify log queries (#10152) 2026-01-29 16:28:15 +00:00
0003_logs_thread_id.sql chore: unify log queries (#10152) 2026-01-29 16:28:15 +00:00
0004_thread_dynamic_tools.sql [feat] persist thread_dynamic_tools in db (#10252) 2026-02-03 00:06:44 +00:00
0005_threads_cli_version.sql Leverage state DB metadata for thread summaries (#10621) 2026-02-05 16:39:11 +00:00
0006_memories.sql feat: mem v2 - PR5 (#11372) 2026-02-10 23:22:55 +00:00
0007_threads_first_user_message.sql Leverage state DB metadata for thread summaries (#10621) 2026-02-05 16:39:11 +00:00
0008_backfill_state.sql feat: resumable backfill (#10745) 2026-02-05 14:34:34 +00:00
0009_stage1_outputs_rollout_slug.sql feat: add slug in name (#11739) 2026-02-13 15:24:03 +00:00
0010_logs_process_id.sql Add process_uuid to sqlite logs (#11534) 2026-02-14 17:27:22 -08:00
0011_logs_partition_prune_indexes.sql state: enforce 10 MiB log caps for thread and threadless process logs (#12038) 2026-02-18 17:08:08 -08:00
0012_logs_estimated_bytes.sql state: enforce 10 MiB log caps for thread and threadless process logs (#12038) 2026-02-18 17:08:08 -08:00
0013_threads_agent_nickname.sql feat: add nick name to sub-agents (#12320) 2026-02-20 14:39:49 +00:00
0014_agent_jobs.sql Agent jobs (spawn_agents_on_csv) + progress UI (#10935) 2026-02-24 21:00:19 +00:00
0015_agent_jobs_max_runtime_seconds.sql Agent jobs (spawn_agents_on_csv) + progress UI (#10935) 2026-02-24 21:00:19 +00:00
0016_memory_usage.sql feat: record memory usage (#12761) 2026-02-25 13:48:40 +00:00
0017_phase2_selection_flag.sql nit: migration (#12772) 2026-02-25 13:56:52 +00:00
0018_phase2_selection_snapshot.sql feat: memories forgetting (#12900) 2026-02-26 13:19:57 +00:00
0019_thread_dynamic_tools_defer_loading.sql dynamic tool calls: add param exposeToContext to optionally hide tool (#14501) 2026-03-14 01:58:43 -07:00
0020_threads_model_reasoning_effort.sql Feat: CXA-1831 Persist latest model and reasoning effort in sqlite (#14859) 2026-03-17 10:14:34 -07:00
0021_thread_spawn_edges.sql feat: add graph representation of agent network (#15056) 2026-03-19 10:21:25 +00:00
0022_threads_agent_path.sql feat: change multi-agent to use path-like system instead of uuids (#15313) 2026-03-20 18:23:48 +00:00
0023_drop_logs.sql chore: drop log DB (#16433) 2026-04-01 15:49:17 +02:00
0024_remote_control_enrollments.sql app-server: Add transport for remote control (#15951) 2026-04-06 14:55:59 -07:00
0025_thread_timestamps_millis.sql Moving updated-at timestamps to unique millisecond times (#17489) 2026-04-14 11:55:34 -04:00
0026_thread_dynamic_tools_namespace.sql [tool search] support namespaced deferred dynamic tools (#18413) 2026-04-21 14:13:08 +08:00
0027_threads_cwd_sort_indexes.sql Support multiple cwd filters for thread list (#18502) 2026-04-22 06:10:09 -04:00
0028_device_key_bindings.sql app-server: persist device key bindings in sqlite (#19206) 2026-04-23 21:55:56 -07:00
0029_thread_goals.sql Add goal persistence foundation (1 / 5) (#18073) 2026-04-24 20:51:38 -07:00
0030_threads_thread_source.sql [codex-analytics] rework thread_source for thread analytics (#20949) 2026-05-06 02:12:31 +00:00
0031_drop_device_key_bindings.sql device-key: clean up unused crate (#21487) 2026-05-07 09:01:44 -07:00
0032_threads_preview.sql Use goal preview metadata for goal-first threads (#21981) 2026-05-11 10:12:46 -07:00
0033_thread_goal_stopped_statuses.sql goal: pause continuation loops on usage limits and blockers (#23094) 2026-05-18 11:28:53 -07:00
0034_drop_thread_goals.sql feat: dedicated goal DB (#23300) 2026-05-19 11:11:41 +02:00
0035_drop_memory_tables.sql Move memory state to a dedicated SQLite DB (#24591) 2026-05-26 20:07:25 +02:00
0036_threads_visible_sort_indexes.sql Index visible thread list ordering (#27391) 2026-06-10 11:52:17 -05:00
0037_remote_control_enrollments_enabled.sql feat(app-server): persist remote-control desired state (#27445) 2026-06-11 21:28:52 -07:00
0038_external_agent_config_imports.sql [codex] Record external agent import results (#28396) 2026-06-15 23:17:24 -07:00
0039_threads_recency_at.sql [codex] Restore thread recency with compatible migration history (#28671) 2026-06-17 18:52:18 +00:00
0040_threads_history_mode.sql feat(app-server): add history_mode to thread (#29927) 2026-06-26 09:12:42 -07:00
0041_threads_name.sql Persist names for paginated threads (#34229) 2026-07-19 21:13:13 +00:00
0042_drop_agent_jobs.sql Remove CSV-backed agent jobs (#34413) 2026-07-20 21:00:17 +00:00
0043_threads_is_pinned.sql Add persisted thread pinning to the app server (#34840) 2026-07-22 22:54:28 +00:00
0044_external_agent_config_imports_provider_id.sql Record externally completed agent config imports (#34981) 2026-07-23 17:55:22 +00:00
0045_threads_section.sql Add persisted sections for organizing threads (#35722) 2026-07-28 05:26:16 +00:00
0046_threads_section_order.sql Add persisted manual ordering for thread sections (#36007) 2026-07-29 18:37:22 +00:00
0047_rollout_migration_state.sql Add rollout migration tooling and background migration (#37348) 2026-08-07 01:26:42 +00:00
0048_thread_section_appearance.sql Add appearance metadata to thread sections (#37898) 2026-08-10 23:32:42 +00:00
0049_projects.sql Add experimental app-server project APIs (#38940) 2026-08-17 04:01:37 +00:00
0050_threads_section_empty_preview_indexes.sql Persist thread section moves before the first turn (#39523) 2026-08-19 17:57:40 +00:00
0051_thread_artifacts.sql Add persisted thread artifact models (#40509) 2026-08-25 01:10:10 +00:00
0052_projects_recency.sql Add recency sorting to project/list (#41223) 2026-08-27 23:43:46 +00:00
0053_threads_originator.sql Expose thread originators through the app-server API (#42458) 2026-09-03 06:02:25 +00:00
0054_threads_daybreak_enabled.sql Persist Daybreak preferences in thread metadata (#42854) 2026-09-04 21:17:25 +00:00
0055_thread_attachments.sql Rename thread artifacts to attachments in the state database (#43927) 2026-09-08 22:02:55 +00:00