From 95468878fb2b2976d789f3605a55ee93a83e7a7c Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 25 Feb 2026 16:27:03 -0600 Subject: [PATCH] relate: 09bb95a5 --RELATED_TO--> c7623317 --- ...d-layoutpy-ported-to-card-creation-rep-c76233.md | 7 ++++++- ...on-database-side-schema-router-changes-09bb95.md | 8 +++++++- ...TED_TO--fullcard-migration-card-layout-0b7eb8.md | 13 +++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 graph/edges/fullcard-migration-database-si--RELATED_TO--fullcard-migration-card-layout-0b7eb8.md diff --git a/graph/decisions/fullcard-migration-card-layoutpy-ported-to-card-creation-rep-c76233.md b/graph/decisions/fullcard-migration-card-layoutpy-ported-to-card-creation-rep-c76233.md index d10df629b19..95fe9877116 100644 --- a/graph/decisions/fullcard-migration-card-layoutpy-ported-to-card-creation-rep-c76233.md +++ b/graph/decisions/fullcard-migration-card-layoutpy-ported-to-card-creation-rep-c76233.md @@ -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 diff --git a/graph/decisions/fullcard-migration-database-side-schema-router-changes-09bb95.md b/graph/decisions/fullcard-migration-database-side-schema-router-changes-09bb95.md index 43c91e78e53..205783a136a 100644 --- a/graph/decisions/fullcard-migration-database-side-schema-router-changes-09bb95.md +++ b/graph/decisions/fullcard-migration-database-side-schema-router-changes-09bb95.md @@ -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. diff --git a/graph/edges/fullcard-migration-database-si--RELATED_TO--fullcard-migration-card-layout-0b7eb8.md b/graph/edges/fullcard-migration-database-si--RELATED_TO--fullcard-migration-card-layout-0b7eb8.md new file mode 100644 index 00000000000..c526dcdb5d8 --- /dev/null +++ b/graph/edges/fullcard-migration-database-si--RELATED_TO--fullcard-migration-card-layout-0b7eb8.md @@ -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