From 4f456700663e643866bf5b071e3380d3ac018755 Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 24 Apr 2026 17:39:24 -0400 Subject: [PATCH] fix(worker): use seasons.id instead of seasons.season_id in ClaimJob The seasons table was recreated with id BIGSERIAL (not season_id VARCHAR). The ClaimJob query was still referencing s.season_id (stale column name). Co-Authored-By: Claude Sonnet 4.6 --- cmd/acb-worker/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/acb-worker/db.go b/cmd/acb-worker/db.go index fb80fad..8d9ef81 100644 --- a/cmd/acb-worker/db.go +++ b/cmd/acb-worker/db.go @@ -169,7 +169,7 @@ func (c *DBClient) ClaimJob(ctx context.Context, jobID string, workerID string) var match DBMatch err = tx.QueryRowContext(ctx, ` SELECT m.match_id, m.status, m.winner, m.map_id, m.created_at, m.completed_at, - COALESCE(s.season_id, ''), COALESCE(s.rules_version::text, '') + COALESCE(s.id::text, ''), COALESCE(s.rules_version::text, '') FROM matches m LEFT JOIN seasons s ON s.status = 'active' WHERE m.match_id = $1