fix(db): bump 0012/0013 journal timestamps so drizzle applies them

Same regression we hit with 0010/0011 in commit 1b7f553: drizzle's
migrator skips entries whose 'when' is older than the latest applied
migration's recorded created_at. 0012's when (1778412502601) and
0013's when (1778418181504) were generated BEFORE 0011's manually-
bumped when of 1778464002000, so 'pnpm migrate' kept reporting
'Migrations applied.' while silently skipping both. Result: web
500'd on every authenticated request — getCurrentUser hit
'column "email" does not exist' because the operators schema in
code expected the column 0013 was supposed to add.

Bumped 0012 to 0011.when + 1s and 0013 to + 2s, re-ran migrate.
operators now has the email column, reminders.delivery_window_end_hour
default is now 24 (the off-sentinel), and the web container is back
up with no 500s.

Note for future: the journal timestamps must be strictly monotonic
across the entries[] order. The fix in commit 1b7f553 didn't future-
proof us against the next batch. Keeping a long-term automated guard
against this is a TODO.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yiekheng 2026-05-10 21:35:52 +08:00
parent b988d117a3
commit 27318888bc

View File

@ -1,104 +1,104 @@
{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1778311164225,
"tag": "0000_conscious_tarantula",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1778320434707,
"tag": "0001_smart_vertigo",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1778338808600,
"tag": "0002_left_jimmy_woo",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1778343712901,
"tag": "0003_messy_bruce_banner",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1778345543406,
"tag": "0004_next_prowler",
"breakpoints": true
},
{
"idx": 5,
"version": "7",
"when": 1778347437350,
"tag": "0005_flippant_joystick",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1778385559051,
"tag": "0006_adorable_nehzno",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1778386591494,
"tag": "0007_overconfident_menace",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1778395584234,
"tag": "0008_greedy_matthew_murdock",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1778464000000,
"tag": "0009_rename_ended_to_inactive",
"breakpoints": true
},
{
"idx": 10,
"version": "7",
"when": 1778464001000,
"tag": "0010_fancy_wolf_cub",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1778464002000,
"tag": "0011_premium_grandmaster",
"breakpoints": true
},
{
"idx": 12,
"version": "7",
"when": 1778412502601,
"tag": "0012_lucky_masked_marvel",
"breakpoints": true
},
{
"idx": 13,
"version": "7",
"when": 1778418181504,
"tag": "0013_tricky_yellowjacket",
"breakpoints": true
}
]
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1778311164225,
"tag": "0000_conscious_tarantula",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1778320434707,
"tag": "0001_smart_vertigo",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1778338808600,
"tag": "0002_left_jimmy_woo",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1778343712901,
"tag": "0003_messy_bruce_banner",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1778345543406,
"tag": "0004_next_prowler",
"breakpoints": true
},
{
"idx": 5,
"version": "7",
"when": 1778347437350,
"tag": "0005_flippant_joystick",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1778385559051,
"tag": "0006_adorable_nehzno",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1778386591494,
"tag": "0007_overconfident_menace",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1778395584234,
"tag": "0008_greedy_matthew_murdock",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1778464000000,
"tag": "0009_rename_ended_to_inactive",
"breakpoints": true
},
{
"idx": 10,
"version": "7",
"when": 1778464001000,
"tag": "0010_fancy_wolf_cub",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1778464002000,
"tag": "0011_premium_grandmaster",
"breakpoints": true
},
{
"idx": 12,
"version": "7",
"when": 1778464003000,
"tag": "0012_lucky_masked_marvel",
"breakpoints": true
},
{
"idx": 13,
"version": "7",
"when": 1778464004000,
"tag": "0013_tricky_yellowjacket",
"breakpoints": true
}
]
}