feat: add contract_config JSONB to teams table (#319) #335
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!335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "319-contract-config-teams"
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
Adds a nullable
contract_configJSONB column to theteamstable, enabling per-team contract configuration storage.Changes
alembic/versions/031_add_contract_config_to_teams.py-- New migration addingcontract_config JSONB DEFAULT NULLtoteamstable (reversible)src/basketball_api/models.py-- Addedcontract_config: Mapped[dict | None]field toTeammodel usingJSONBtypeTest Plan
Team.__table__.columnsincludescontract_configdowngrade()drops the columnReview Checklist
sqlalchemy.dialects.postgresqlRelated Notes
None.
Related
Closes #319
QA Review -- PR #335
Scope Check
031_add_contract_config_to_teams.py): Correct. Adds nullable JSONB column, reversible downgrade drops it. Follows the established pattern from migration 030.models.py): Correct.contract_config: Mapped[dict | None] = mapped_column(JSONB, nullable=True)-- uses the already-imported JSONB type, placed logically beforecreated_at.Observations
3c167ea feat: include is_public in admin players list response) that modifiesadmin.pyandtest_admin_spa.py. This commit exists in the local clone but not on remote main. Recommend rebasing ontoorigin/mainto produce a clean single-commit diff. This is a blocking nit -- the PR should only contain changes for issue #319.Checklist
VERDICT: APPROVE with nit
The two files in scope (migration + model) are correct and clean. The stale
is_publiccommit should be rebased out before merge, but that is a branch hygiene issue, not a code quality issue. The contract_config implementation itself is approved.ac76415ee61c9a948b6dRebased onto
origin/mainand skipped the staleis_publiccommit. Branch now contains only the single contract_config commit. QA nit resolved.