Solo Developer Shares How a Missing PostgreSQL GRANT Broke Multi-Tenant CRM in Production
A Brazilian solo full-stack developer built FunilChat AI, a multi-tenant WhatsApp CRM with an AI agent designed to handle sensitive customer documents including SSN and tax ID equivalents. The system uses PostgreSQL row-level security to isolate data across multiple business clients within a single database, avoiding the complexity of per-tenant deployments. Months into production, an n8n automation workflow silently failed to create handoff notifications because a database migration had granted INSERT on the notifications table but omitted the required GRANT USAGE and SELECT on the associated sequence. The missing sequence permission prevented auto-generated IDs from being created, and the fix required a follow-up migration to explicitly grant those sequence privileges. The project has been running continuously since April 2026 and now spans 21 tables under row-level security across release 2.21.0.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in