mAi
a905911cf4
fix(deadlines): restore /api/events deadline rail after mig 140 column drop (t-paliad-344)
...
Two SELECTs still referenced paliad.deadlines.rule_id after mig 140
(Slice B.4) dropped that column in favour of sequencing_rule_id:
- internal/services/deadline_service.go:268 — DeadlineService.
ListVisibleForUser. Powers /api/events?type=deadline (dashboard
deadline rail, /deadlines page, every status bucket). Threw
`pq: column f.rule_id does not exist` on every request → 500
for any authenticated user hitting the dashboard.
- internal/services/projection_service.go:1250 — collectActualsForOverrides.
Same column on `paliad.deadlines d`. Logged once per projection
pass (`ERROR service: projection: deadlines: ...`); aliased the
rename to `rule_id` so the receiving struct tag still scans.
Live container logs confirmed the failure mode — a 60-row burst of
`pq: column f.rule_id does not exist at position 3:36 (42703)` starting
the minute the post-B0 container came up (mig 140 had applied to the
DB but the SELECT still used the dropped name). EXPLAIN against the
live schema after the edit plans cleanly; the LEFT JOIN to
paliad.deadline_rules_unified on sequencing_rule_id was already correct
(only the SELECT projection was stale).
Root cause: mig 140 commit (1129bab ) renamed the JOIN to
`f.sequencing_rule_id` but left the SELECT clause on the older name.
The model tag is already `db:"sequencing_rule_id" json:"rule_id"`, so
the wire shape is unchanged — only the column reference flips.
bun build clean, go vet ./... clean, go test ./... green.
2026-05-28 00:47:08 +02:00
..
2026-05-06 16:05:00 +02:00
2026-05-22 15:17:24 +02:00
2026-05-26 19:24:41 +02:00
2026-05-21 21:21:32 +02:00
2026-05-22 15:17:24 +02:00
2026-05-20 13:05:27 +02:00
2026-05-20 14:46:36 +02:00
2026-05-20 14:46:36 +02:00
2026-05-25 15:49:39 +02:00
2026-04-30 16:46:31 +02:00
2026-05-19 12:51:52 +02:00
2026-05-26 18:19:55 +02:00
2026-05-26 18:17:21 +02:00
2026-05-25 15:28:37 +02:00
2026-05-20 13:05:27 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-20 13:26:23 +02:00
2026-04-17 11:59:49 +02:00
2026-05-13 00:11:14 +02:00
2026-05-13 00:11:14 +02:00
2026-05-20 13:26:23 +02:00
2026-04-30 16:46:31 +02:00
2026-05-07 22:41:18 +02:00
2026-05-07 22:41:18 +02:00
2026-05-20 15:50:21 +02:00
2026-05-20 15:50:21 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:50:21 +02:00
2026-05-27 15:22:53 +02:00
2026-05-27 15:22:53 +02:00
2026-05-06 12:47:12 +02:00
2026-05-20 13:55:56 +02:00
2026-05-20 19:15:32 +02:00
2026-05-22 15:53:19 +02:00
2026-05-22 15:53:19 +02:00
2026-05-20 13:55:56 +02:00
2026-05-20 19:15:32 +02:00
2026-05-04 12:03:56 +02:00
2026-05-25 16:06:35 +02:00
2026-05-25 16:06:35 +02:00
2026-05-15 17:53:44 +02:00
2026-05-26 20:07:48 +02:00
2026-05-25 15:36:08 +02:00
2026-05-27 20:34:54 +02:00
2026-04-30 16:46:31 +02:00
2026-05-28 00:47:08 +02:00
2026-05-06 17:16:17 +02:00
2026-05-22 15:48:47 +02:00
2026-05-26 19:53:24 +02:00
2026-05-26 19:53:24 +02:00
2026-05-19 13:05:54 +02:00
2026-05-20 15:19:48 +02:00
2026-04-29 22:09:39 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-05 13:29:47 +02:00
2026-05-18 12:13:24 +02:00
2026-05-25 16:45:07 +02:00
2026-05-25 16:45:07 +02:00
2026-05-16 01:17:23 +02:00
2026-05-26 17:59:58 +02:00
2026-05-04 19:49:37 +02:00
2026-05-25 14:54:51 +02:00
2026-05-15 01:09:31 +02:00
2026-05-18 15:06:04 +02:00
2026-04-30 16:46:31 +02:00
2026-05-20 13:03:57 +02:00
2026-05-20 13:03:57 +02:00
2026-05-26 18:17:21 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-20 19:15:32 +02:00
2026-05-20 19:15:32 +02:00
2026-05-26 22:01:10 +02:00
2026-05-27 15:07:01 +02:00
2026-05-27 10:14:37 +02:00
2026-05-27 15:07:01 +02:00
2026-05-26 11:21:29 +02:00
2026-05-26 11:19:01 +02:00
2026-05-27 10:14:37 +02:00
2026-05-06 12:47:12 +02:00
2026-05-26 13:01:07 +02:00
2026-04-20 12:34:38 +02:00
2026-04-29 22:09:39 +02:00
2026-05-07 22:41:18 +02:00
2026-05-07 22:41:18 +02:00
2026-04-30 03:18:03 +02:00
2026-05-27 15:11:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-03 18:39:06 +02:00
2026-05-15 03:03:12 +02:00
2026-05-08 12:42:57 +02:00
2026-05-08 21:48:08 +02:00
2026-05-22 15:17:24 +02:00
2026-05-08 21:48:08 +02:00
2026-05-08 21:48:08 +02:00
2026-05-06 16:41:41 +02:00
2026-05-26 09:41:07 +02:00
2026-05-07 22:29:39 +02:00
2026-05-07 22:21:45 +02:00
2026-05-18 12:13:24 +02:00
2026-05-20 14:53:22 +02:00
2026-05-26 13:01:07 +02:00
2026-05-20 14:55:55 +02:00
2026-05-21 14:52:50 +02:00
2026-05-07 22:58:44 +02:00
2026-05-04 19:30:37 +02:00
2026-05-27 10:09:33 +02:00
2026-05-27 10:09:33 +02:00
2026-05-22 23:43:15 +02:00
2026-05-26 09:56:15 +02:00
2026-05-18 12:13:24 +02:00
2026-05-09 18:52:01 +02:00
2026-05-18 15:06:04 +02:00
2026-05-20 14:55:55 +02:00
2026-05-28 00:47:08 +02:00
2026-04-30 16:46:31 +02:00
2026-05-07 21:50:31 +02:00
2026-05-15 00:06:37 +02:00
2026-05-25 15:49:39 +02:00
2026-05-26 19:53:24 +02:00
2026-05-18 15:06:04 +02:00
2026-05-27 15:22:53 +02:00
2026-05-27 23:50:14 +02:00
2026-05-27 23:50:14 +02:00
2026-05-27 15:02:01 +02:00
2026-05-26 17:48:56 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 20:04:40 +02:00
2026-05-26 20:04:40 +02:00
2026-05-18 16:52:38 +02:00
2026-05-26 20:21:12 +02:00
2026-05-26 20:15:28 +02:00
2026-05-25 17:03:34 +02:00
2026-05-26 19:23:40 +02:00
2026-05-28 00:01:30 +02:00
2026-05-28 00:01:30 +02:00
2026-05-25 16:32:45 +02:00
2026-05-25 15:12:10 +02:00
2026-05-21 15:23:24 +02:00
2026-05-21 15:23:24 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 20:26:53 +02:00
2026-05-26 20:26:53 +02:00
2026-05-25 16:03:03 +02:00
2026-05-25 16:51:35 +02:00
2026-05-26 19:53:24 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:24:06 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-20 13:05:27 +02:00
2026-05-20 14:46:36 +02:00
2026-04-30 16:46:31 +02:00
2026-05-20 15:19:48 +02:00
2026-05-07 12:51:37 +02:00
2026-05-07 12:51:37 +02:00
2026-05-25 15:37:00 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-04 12:03:56 +02:00
2026-05-04 18:57:06 +02:00
2026-05-21 09:54:23 +02:00