relate: 09bb95a5 --RELATED_TO--> c7623317

This commit is contained in:
Cal Corum 2026-02-25 16:27:03 -06:00
parent c1a7459129
commit 95468878fb
3 changed files with 26 additions and 2 deletions

View File

@ -6,7 +6,7 @@ tags: [paper-dynasty, card-creation, card_layout, fullcard, cardcolumn, migratio
importance: 0.8
confidence: 0.8
created: "2026-02-25T22:26:22.293769+00:00"
updated: "2026-02-25T22:27:03.733654+00:00"
updated: "2026-02-25T22:27:03.842958+00:00"
relations:
- target: 52e4aa12-66ea-4c4b-9115-00099e4e4343
type: FOLLOWS
@ -18,6 +18,11 @@ relations:
direction: incoming
strength: 0.8
edge_id: 06095a46-699a-47bf-a1f1-418605b03d0f
- target: 09bb95a5-2b2f-43e5-93a6-6b96b881461f
type: RELATED_TO
direction: incoming
strength: 0.8
edge_id: 0b7eb89e-5ffa-4f42-9a07-b6f34c6d3990
---
## Context\nOn branch feature/fullcard-migration, created /mnt/NV2/Development/paper-dynasty/card-creation/card_layout.py.\n\n## What Was Ported\nPorted PlayResult, PLAY_RESULTS, EXACT_CHANCES, get_chances(), CardResult, CardColumn, FullCard, FullBattingCard, FullPitchingCard from database/app/card_creation.py.\n\n## Key Adaptations\n- card_output() uses col_* key names (col_one_2d6, col_one_results, col_one_d20, col_two_2d6, col_two_results, col_two_d20, col_three_2d6, col_three_results, col_three_d20) to match planned DB column names — NOT the database version's one_2d6, two_2d6 etc.\n- get_chances() always returns Decimal(str(val)) to avoid float/Decimal comparison TypeError\n- FullBattingCard and FullPitchingCard do NOT embed a ratings model (no ratings= param) to avoid circular imports; only offense_col and alt_direction are passed

View File

@ -6,7 +6,13 @@ tags: [paper-dynasty, database, db_engine, battingcardratings, pitchingcardratin
importance: 0.8
confidence: 0.8
created: "2026-02-25T22:26:54.133040+00:00"
updated: "2026-02-25T22:26:54.133040+00:00"
updated: "2026-02-25T22:27:03.842958+00:00"
relations:
- target: c7623317-ea0a-4b8a-9375-65fc3aac5303
type: RELATED_TO
direction: outgoing
strength: 0.8
edge_id: 0b7eb89e-5ffa-4f42-9a07-b6f34c6d3990
---
## 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.

View File

@ -0,0 +1,13 @@
---
id: 0b7eb89e-5ffa-4f42-9a07-b6f34c6d3990
type: RELATED_TO
from_id: 09bb95a5-2b2f-43e5-93a6-6b96b881461f
from_title: "FullCard migration: database-side schema + router changes"
to_id: c7623317-ea0a-4b8a-9375-65fc3aac5303
to_title: "FullCard Migration: card_layout.py ported to card-creation repo"
strength: 0.8
created: "2026-02-25T22:27:03.842958+00:00"
updated: "2026-02-25T22:27:03.842958+00:00"
---
Database schema changes are the server-side counterpart to the card_layout.py migration