Repository navigation
chore(migrations): fold the post-v2.5.5 migrations into one - #994
Merged
Merged
Conversation
v2.5.5 shipped through 0057, so 0058 through 0060 have never reached a release and no install in the wild has applied them. Fold them into 0058_post_v2_5_5_schema, as #909 did for the post-v2.3.3 chain, so an upgrading install applies one migration. Operations keep their order: the series fields, the series filter columns, the FTS drop and recreate with series_summary, then the metadata_imported_at backfill. The FTS SQL and the backfill were copied verbatim from the old files. Verified on scratch databases: a fresh migrate of the fold and of the old chain give identical sqlite_master schemas, as does an upgrade from 0057. Rolling the fold back gives the 0057 schema. makemigrations --check reports no changes. tests/test_lazy_import_marker.py imported the backfill by module path and is repointed at the folded module. A dev database that already applied the old 0058-0060 needs to be rebuilt or `migrate codex 0058_post_v2_5_5_schema --fake`. A renamed migration is one the recorder has never seen, so it would re-apply and fail on a duplicate column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Folds the three migrations added since v2.5.5 into one,
0058_post_v2_5_5_schema, as #909 did for the post-v2.3.3 chain.v2.5.5 shipped through 0057, so none of these has reached a release. An upgrading install now applies one migration instead of three.
Folded
0058_series_fields0059_series_filters_and_fts_summaryseries_summary0060_backfill_metadata_imported_atmetadata_imported_atbackfill (#992)Operations keep their order. The FTS SQL constants and the backfill function were copied verbatim from the old files by script.
tests/test_lazy_import_marker.pyimported the backfill by module path and is repointed at the folded module.Verification
All checks were run on scratch databases (
CODEX_CONFIG_DIR), by diffingsqlite_masterdumps:makemigrations --checkreports no changes.make lintandmake tyare clean.make test: 1753 passed, 1 xfailed; frontend 1033 passed.Dev databases
A database that already applied the old 0058–0060 will try to apply the renamed migration again and fail on a duplicate column. Rebuild it, or, only if all three old ones were applied, run:
🤖 Generated with Claude Code