Add idempotent migration for picks_expires_at / picks_started_at #73

Merged
chrisp merged 1 commit from fix/migration-picks-expires-at into main 2026-06-06 06:49:21 +00:00
Owner

Summary

  • Migration 0116 added picks_expires_at and picks_started_at columns to draft_timers, but was generated with an out-of-order timestamp and was never applied to the DB — causing PostgresError: column "picks_expires_at" does not exist when starting a draft.
  • Migration 0117 re-adds both columns with IF NOT EXISTS guards, making the apply safe regardless of DB state.

Test plan

  • Run npm run db:migrate — should apply cleanly with no errors
  • Start a new draft — the Postgres column error should be gone
## Summary - Migration `0116` added `picks_expires_at` and `picks_started_at` columns to `draft_timers`, but was generated with an out-of-order timestamp and was never applied to the DB — causing `PostgresError: column "picks_expires_at" does not exist` when starting a draft. - Migration `0117` re-adds both columns with `IF NOT EXISTS` guards, making the apply safe regardless of DB state. ## Test plan - [ ] Run `npm run db:migrate` — should apply cleanly with no errors - [ ] Start a new draft — the Postgres column error should be gone
chrisp added 1 commit 2026-06-06 06:45:08 +00:00
Add idempotent migration for picks_expires_at / picks_started_at columns
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m34s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m18s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
81bacf421d
Migration 0116 added these columns to draft_timers but was generated
with an out-of-order timestamp and was never applied to the DB. Migration
0117 re-adds them with IF NOT EXISTS guards so the apply is safe
regardless of the DB's current state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chrisp merged commit 60aa8a8c9a into main 2026-06-06 06:49:21 +00:00
chrisp deleted branch fix/migration-picks-expires-at 2026-06-06 06:49:21 +00:00
Sign in to join this conversation.
No description provided.