mirror of
https://github.com/openai/codex.git
synced 2026-09-10 20:26:47 +00:00
## 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
7 lines
298 B
SQL
7 lines
298 B
SQL
ALTER TABLE thread_artifacts RENAME TO thread_attachments;
|
|
ALTER TABLE thread_attachments RENAME COLUMN artifact_type TO attachment_type;
|
|
|
|
DROP INDEX idx_thread_artifacts_thread_created_id;
|
|
CREATE INDEX idx_thread_attachments_thread_created_id
|
|
ON thread_attachments(thread_id, created_at, id);
|