Fold 0054 into 0053 and rename Alternate Series to Reprints - #833
Merged
Conversation
The 0054 data migration remapped stored alternate_number sort keys, but it can only fire on a database that already applied 0053 (so 0053 never re-runs) AND holds the key — the dev database, which is being rebuilt. On a fresh database it finds zero rows, and the key never reached a release, so it is dead by construction. 0053 is the only migration again. The sidecar restore rename stays: a sidecar written by a development build outlives the database it came from, and that is now the only way the retired key can enter a fresh install. The concept is renamed to Reprints across the sort, table column, filter, metadata panel, tag editor and the reader's reading-order menu. "Alternate Series" is ComicInfo's word for one of five sources — MetronInfo contributes both Reprints and localized AlternativeNames, CoMet isVersionOf, and the Metron and ComicVine APIs their own — and it misdescribes the localized names. MetronInfo, comicbox and the ORM all already say reprints, so the UI now matches the data model end to end and the internal vocabulary stops needing translation. 0053's choices tuple is edited in place (unreleased); released 0049 keeps its historical label, since the final migrated state comes from 0053. The redundant metadata TAG_NAMES override is dropped now that the label is the capital-cased key. Co-Authored-By: Claude Fable 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.
Follow-up to #832.
Migrations: 0053 is the only one again
0054 remapped stored
alternate_numbersort keys, but it is dead by construction: it can only fire on a database that already applied 0053 — which means Django never re-runs 0053 — and still holds the retired key. That is exactly the dev database being wiped and rebuilt. On a fresh database it finds zero rows, and the key never reached a tagged release, so no upgrading install can carry it either. Deleted, along with its test.The sidecar restore rename (
_SORT_KEY_RENAMES) stays: a sidecar written by a development build outlives the database it came from, so restore is now the only path by which the retired key can enter a fresh install. Its tests stay too.Verified:
makemigrations --checkclean, and a from-scratchmigrateon an empty config dir ends at0053_reprint_issue_number_and_collection_order_memory.Rename: Alternate Series → Reprints
"Alternate Series" is ComicInfo's name for one of the five sources that feed this data. MetronInfo — the format we weight most — contributes two of its own (
<Reprints><Reprint>and localized<Series><AlternativeNames lang=…>), CoMet contributesisVersionOf, and the Metron and ComicVine API transforms contribute issue reprints and volume aliases. The old label named the narrowest of those and actively misdescribes the localized-names half.MetronInfo's tag, comicbox's key, and codex's
Reprintmodel already all say reprints, so the UI now matches the data model end to end and the internal vocabulary stops needing translation when reading code, issues, and bug reports.Renamed across every surface: the sort, the table column, the filter drawer, the metadata panel, the tag editor section and its "+ Add Reprint" button, and the reader's reading-order menu — plus comments, docstrings and test prose. Format tag names (
AlternateSeries,AlternateNumber) are untouched where they refer to the actual ComicInfo tags.Reviewer notes
codex/choices/browser.pyand, identically, in 0053's choices tuple (choice order is part of migration state).("reprints", "Alternate Series")label on purpose. Editing a shipped migration's historical state would be wrong, and the final migrated state comes from 0053, somakemigrationsstays clean.TAG_NAMESoverride forreprintsis dropped — it exists for rows whose label isn't the capital-cased key, and "Reprints" now is. Its spec's stale negative assertion went with it.tests/test_search_alternate_series.py→tests/test_search_reprints.py.stats-tab.test.jsfailure (fails on a clean tree too); lint, ty and complexity clean.🤖 Generated with Claude Code