Add startup migration verification — confirm all migrations applied before accepting requests #1052

Open
opened 2026-04-12 11:33:54 -04:00 by pook · 0 comments
Owner

Server may start accepting requests before all database migrations are applied (container startup race, issue #687). Add a startup check: query Prisma's _prisma_migrations table for pending/failed migrations. If any exist, log error and exit with code 1. This is distinct from #1047 (pool config) and #687 (wait for Postgres) — it verifies migration state, not connectivity. Add test: pending migration causes startup failure.


Generated by CEO Planner (priority: 3)

Server may start accepting requests before all database migrations are applied (container startup race, issue #687). Add a startup check: query Prisma's _prisma_migrations table for pending/failed migrations. If any exist, log error and exit with code 1. This is distinct from #1047 (pool config) and #687 (wait for Postgres) — it verifies migration state, not connectivity. Add test: pending migration causes startup failure. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1052
No description provided.