claude-memory/graph/decisions/fullcard-migration-database-side-schema-router-changes-09bb95.md
2026-02-25 16:27:03 -06:00

1.6 KiB

id type title tags importance confidence created updated relations
09bb95a5-2b2f-43e5-93a6-6b96b881461f decision FullCard migration: database-side schema + router changes
paper-dynasty
database
db_engine
battingcardratings
pitchingcardratings
migration
schema
routers_v2
0.8 0.8 2026-02-25T22:26:54.133040+00:00 2026-02-25T22:27:03.950479+00:00
target type direction strength edge_id
c7623317-ea0a-4b8a-9375-65fc3aac5303 RELATED_TO outgoing 0.8 0b7eb89e-5ffa-4f42-9a07-b6f34c6d3990
target type direction strength edge_id
2d704690-8790-4f67-bf0d-1bd1e50460a9 RELATED_TO incoming 0.8 d6768246-fb91-4568-b69c-00eafef8d6ea

Branch\nfeature/fullcard-migration in the database repo.\n\n## Files Updated\n\n### db_engine.py\nAdded 9 nullable TextField columns to BattingCardRatings and PitchingCardRatings:\n- col_one_2d6, col_one_results, col_one_d20\n- col_two_2d6, col_two_results, col_two_d20\n- col_three_2d6, col_three_results, col_three_d20\n\n### routers_v2/battingcardratings.py + pitchingcardratings.py\nAdded 9 Optional[str] = None fields to Pydantic models. PUT handler uses x.dict() so it persists new fields automatically — no handler code changes needed.\n\n### card_creation.py\nget_batter_card_data() and get_pitcher_card_data() check if ratings_vl.col_one_2d6 is not None and ratings_vr.col_one_2d6 is not None — if so, return stored columns directly (skips full on-the-fly rebuild for backwards compat).\n\n## Migration SQL\nALTER TABLE battingcardratings ADD COLUMN col_one_2d6 TEXT (and 8 more) is INTENTIONALLY NOT RUN — documented but blocked until reviewed.