Bug: queries reference players.team_id but column doesn't exist #25

Closed
opened 2026-03-27 20:40:18 +00:00 by forgejo_admin · 0 comments

Type

Bug

Lineage

Standalone — discovered during incident investigation. Contracts service returning 500s.

Repo

forgejo_admin/westside-contracts

What Broke

All contract pages return HTTP 500: column p.team_id does not exist.

Code assumes players.team_id (direct FK) but basketball-api schema uses player_teams join table (many-to-many). Affects both page load and signing endpoints.

Repro Steps

  1. Navigate to any /contract/{token} URL
  2. Observe: HTTP 500, Postgres error column p.team_id does not exist

Expected Behavior

Contract page loads showing player name, team, fee, and signing form.

Environment

  • Cluster/namespace: prod / westside-contracts
  • Service version/commit: harbor.tail5b443a.ts.net/westside-contracts/app:latest
  • Pod: westside-contracts-5f5bbf5f67-2xshd (running 2d21h, 0 restarts)

Acceptance Criteria

  • /contract/{token} loads without 500
  • /contract/{token}/sign POST succeeds
  • No regression in outbox event payload
  • project-westside-basketball — project this affects
  • basketball-api schema owns the players and player_teams tables
### Type Bug ### Lineage Standalone — discovered during incident investigation. Contracts service returning 500s. ### Repo `forgejo_admin/westside-contracts` ### What Broke All contract pages return HTTP 500: `column p.team_id does not exist`. Code assumes `players.team_id` (direct FK) but basketball-api schema uses `player_teams` join table (many-to-many). Affects both page load and signing endpoints. ### Repro Steps 1. Navigate to any `/contract/{token}` URL 2. Observe: HTTP 500, Postgres error `column p.team_id does not exist` ### Expected Behavior Contract page loads showing player name, team, fee, and signing form. ### Environment - Cluster/namespace: prod / westside-contracts - Service version/commit: `harbor.tail5b443a.ts.net/westside-contracts/app:latest` - Pod: westside-contracts-5f5bbf5f67-2xshd (running 2d21h, 0 restarts) ### Acceptance Criteria - [ ] `/contract/{token}` loads without 500 - [ ] `/contract/{token}/sign` POST succeeds - [ ] No regression in outbox event payload ### Related - `project-westside-basketball` — project this affects - basketball-api schema owns the `players` and `player_teams` tables
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-contracts#25
No description provided.