Supabase & databases
Your app loads, you log in — and your data is missing, blocked, or refusing to save. With Supabase and databases, the problem is usually permissions, not broken code: a row-level security policy quietly hiding your rows, a connection limit you've hit, or a migration that changed the database but not your app. This section helps you tell those apart, check the right setting first, and fix it without exposing data you meant to keep private.
Common culprits: row-level security (RLS) policies, too many database connections, failed or out-of-sync migrations, wrong API keys for the job, and Prisma or other ORM errors that don't match the real database error underneath.
-
Prisma: Can't reach database server / too many connections (serverless)
Prisma P1001 and too-many-connections errors on serverless usually mean you are using a direct connection string. Switch the app to the pooled URL with connection_limit=1 and keep a direct URL for migrations.
-
new row violates row-level security policy for table "<your_table>"
Supabase says a new row violates row-level security policy (42501)? Add a WITH CHECK insert policy, verify auth.uid(), and test as a real user — without disabling RLS.