Skip to content

fix: merge PERMANENT card_type into LANDMARK_PERMANENT - #75

Merged
toxicity1985 merged 1 commit into
mainfrom
fix/merge-permanent-landmark-permanent-card-type
Oct 6, 2026
Merged

toxicity1985 merged 1 commit into
mainfrom
fix/merge-permanent-landmark-permanent-card-type

Conversation

@julesduroux

Copy link
Copy Markdown
Contributor

Le problème

CardsData a déjà fusionné ces deux types après revue ("PERMANENT and
LANDMARK_PERMANENT were the same design intent in practice") — vérifié :
CardFamilies.csv de CardsData a 0 ligne à PERMANENT et 92 à
LANDMARK_PERMANENT, la fusion y est donc totale.

Mais côté API, CardGroupBuilder::findOrCreateCardType() reprenait la
référence brute du JSON Equinox sans normalisation — PERMANENT continuait
donc d'être recréé comme un card_type distinct ici, jamais réconcilié avec
la fusion actée côté CardsData.

Le fix

Normalisation PERMANENT → LANDMARK_PERMANENT au point unique où tout
chemin d'import résout un type de carte. Migration de backfill
(Version20260911170000) qui réaffecte les card_group existants pointant
sur PERMANENT vers LANDMARK_PERMANENT, puis supprime la ligne card_type
PERMANENT devenue orpheline (no-op si l'un des deux types n'existe pas).

À exécuter après merge

Rien de manuel pour la migration (automatique au déploiement).
Mais il faut jouer php bin/console app:meilisearch:index --fields=card_type pour
resynchroniser l'index de recherche (migration en SQL brut, les listeners
Doctrine ne se déclenchent pas).

CardsData already folded these into one type after review ("PERMANENT
and LANDMARK_PERMANENT were the same design intent in practice"), but
that merge only ever touched CardsData's own reference CSVs - this
app's import pipeline (CardGroupBuilder::findOrCreateCardType) still
read the raw Equinox reference verbatim, so PERMANENT kept getting
recreated as a distinct card_type here.

Normalize PERMANENT -> LANDMARK_PERMANENT at the one place every
import path resolves a card type, and backfill existing CardGroup
rows via migration.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@toxicity1985
toxicity1985 merged commit 549f54c into main Oct 6, 2026
2 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.

2 participants