feat: add contract_config JSONB column to teams table #319
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#319
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
Lineage
Sub-ticket of
forgejo_admin/westside-contracts#34— data-driven contract rendering system. Wave 1 (independent).Repo
forgejo_admin/basketball-apiUser Story
As the contract rendering system, I need structured contract configuration data on each team so that the frontend can render tournaments, practices, and payment schedules from data instead of hardcoded HTML.
Context
The westside-contracts app currently hardcodes all contract content (tournaments, practice schedules, payment dates) in a 725-line Svelte component. Moving to data-driven rendering requires a JSONB column on the teams table to hold team-level contract configuration. This is the base layer — player-level overrides (separate ticket) merge on top.
File Targets
alembic/versions/NNN_add_contract_config_to_teams.py— new migrationsrc/basketball_api/models.py— addcontract_configfield to Team modelFiles NOT to touch:
src/basketball_api/routes/— no API changes in this ticketAcceptance Criteria
contract_config JSONB DEFAULT NULLcolumn exists on teams tablecontract_config: Mapped[dict | None]fieldTest Expectations
alembic upgrade headalembic downgrade -1pytest tests/Constraints
sqlalchemy.dialects.postgresql.JSONBtypeChecklist
Related
westside-basketball— parent projectforgejo_admin/westside-contracts#34— parent issueScope Review: NEEDS_REFINEMENT
Review note:
review-772-2026-04-03Template complete, file targets verified, story note confirmed, AC testable, blast radius low. Single refinement needed:
arch-contractsdoes not exist in pal-e-docs. Create it to complete the traceability triangle.Agent picked up this ticket.