Skip to content

Fold 0054 into 0053 and rename Alternate Series to Reprints - #833

Merged
ajslater merged 1 commit into
developfrom
combine-reprint-migrations
Aug 30, 2026
Merged

Fold 0054 into 0053 and rename Alternate Series to Reprints#833
ajslater merged 1 commit into
developfrom
combine-reprint-migrations

Conversation

@ajslater

Copy link
Copy Markdown
Owner

Follow-up to #832.

Migrations: 0053 is the only one again

0054 remapped stored alternate_number sort 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 --check clean, and a from-scratch migrate on an empty config dir ends at 0053_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 contributes isVersionOf, 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 Reprint model 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

  • The order-by choices dict is label-alphabetical, so the entry moved from the A's to between "Reading Direction" and "Scan Info" — in codex/choices/browser.py and, identically, in 0053's choices tuple (choice order is part of migration state).
  • Released migration 0049 keeps its ("reprints", "Alternate Series") label on purpose. Editing a shipped migration's historical state would be wrong, and the final migrated state comes from 0053, so makemigrations stays clean.
  • The metadata store's TAG_NAMES override for reprints is 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.pytests/test_search_reprints.py.
  • Gates: full backend suite 1027 passed; vitest 446 passed with only the pre-existing, unrelated stats-tab.test.js failure (fails on a clean tree too); lint, ty and complexity clean.

🤖 Generated with Claude Code

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>
@ajslater
ajslater merged commit 10aaa0f into develop Aug 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant