Orders queue 500 on first deploy after scan-to-confirm setting added
- Filed
- May 22, 2026, 6:00 PM
- Last update
- May 22, 2026, 7:30 PM
- Resolved
- May 22, 2026, 7:30 PM
The orders page started returning a 500 to every authenticated visitor right after the deploy that added scan-to-confirm. The Drizzle schema referenced a require_scan_to_confirm column on the user_inventory_settings table that did not yet exist in production — the migration file was committed in the same push as the code that queried it, but the migration had not been applied.
Coolify only deploys the Next.js build; it does not run database migrations. The 0094 migration adding the column needed to be applied separately, and we had not built that step into the pipeline yet.
Two-part. First we applied 0094 by hand via psql to unblock the page. Then we built the migrate-on-boot SQL walker (scripts/migrate-on-boot.mjs) that runs every pending Drizzle migration before node server.js starts. The container now refuses to boot if a migration fails, so this class of bug fails loud and fast instead of serving 500s silently.
The new pipeline shipped a few hours after the original incident and has not regressed since.
We'll email you when the status flips — typically when a workaround lands or the fix ships.
Sign in to subscribeSee something we missed? Email us with the KI-001 reference and we'll fold any new info in.