470 B
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).