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 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-24 17:39:24 -04:00
parent 38ae4c6303
commit 4f45670066

View file

@ -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