Files
mercadodevida/work/artifacts/FIX-158/architect.md
2026-08-22 17:26:02 +02:00

470 B

FIX-158 — Architect

Fix

Migration 049 reporting_payment_lines fails with syntax error on inline CHECK constraints. node-pg-migrate constraints.check does NOT support object notation (it generates [object Object]). Fix: use string CHECK constraint.

Root cause

constraints: { check: { nonzero_amount: '...', ... } } → pg-migrate serializes as CHECK ([object Object])

Fix

Changed to constraints: { check: 'amount_cents != 0' } (single string).