feat: seed team contract configs + audit player overrides (#322) #339
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "322-seed-contract-configs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two Alembic data migrations that populate structured JSONB for the data-driven contract rendering system. Migration 034 seeds
contract_configon all 7 teams. Migration 035 setscontract_overrideson players with custom deals and cleans up internal flags incustom_notes.Changes
alembic/versions/034_seed_team_contract_configs.py-- Populatescontract_configJSONB for all 7 teams with tournament schedules, practice times, payment schedules, section toggles, and static content text. Three variants: boys-travel (teams 1-3), girls-travel (teams 4-5), local (teams 6-7, with 17U/16U practice schedule differences).alembic/versions/035_set_player_contract_overrides.py-- Setscontract_overridesfor 3 players with custom rendering needs (Kiana Sikander: tournament filter + 1 practice; Kelsie Stevens + Sophie Furse: local variant override). Cleans up internal flags ("Custom contract needed", "Going to be local") fromcustom_noteswhile preserving display-only notes (eligibility, gas stipend).Test Plan
py_compile)ruff checkandruff formatpasspytest tests/requires live DB (not available locally) -- tests are unaffected by data migrationsSELECT id, contract_config->'variant' FROM teamsshows correct variantsSELECT id, contract_overrides FROM players WHERE id IN (184, 190, 107)shows overridesalembic upgrade headandalembic downgrade -1both cleanReview Checklist
Related Notes
westside-contracts src/routes/contract/[token]/+page.svelteRelated
forgejo_admin/westside-contracts#34(data-driven contract rendering)QA Review -- PR #339
Data Accuracy (cross-checked against
westside-contractsSvelte template)Boys Travel (teams 1-3):
Girls Travel (teams 4-5):
Local (teams 6-7):
Player Overrides (migration 035)
Migration Chain
Potential Concern
VERDICT: APPROVED
Clean data migration. All tournament/practice/payment data cross-verified against the Svelte template source of truth. Player overrides match the issue spec. Migration chain is correct.