mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why SQLx hashes migration SQL byte for byte. A database migrated by a build with CRLF SQL can fail to open in a build with LF SQL, even when the migration statements are identical. ## What changed On a checksum mismatch, retry validation using the stored checksum for each migration whose SQL matches with either line ending. Preserve stored checksums and continue to reject unrelated mismatches and failed migrations. Repair state databases that recorded the recency migration as version `38` by moving its record to `39` for either line ending. Apply the actual version `38` migration in the same transaction. ## Testing Cover upgrades and reopening with an active writer, legacy recency repair with either line ending, and rejection of wrong-version checksums and dirty migration records. GitOrigin-RevId: e8d481811a5150379777340eb355168ee60c41d7