7

When I use the Postgres database on Supabase I run the following command, npx prisma migrate dev --name init, but I get the following error (first command in screenshot):

Error: db error: FATAL: bouncer config error
   0: migration_core::state::DevDiagnostic
             at migration-engine/core/src/state.rs:251

When I use railway.app, with a Postgres database it migrates successfully (second command in screenshot).

screenshot of prisma command, first is supabase, bottom is railway.app

steve238
  • 831
  • 1
  • 10
  • 19

1 Answers1

29

I fixed this error on my end by replacing the port number of my connection string from 6543 to 5432.

Reason: 6543 is the pooled port number which should not be used when migrating, instead the non-pooled connection string using 5432 should be used

Hope this helps!

Source: Second paragraph of the section "Connection pooling with Supabase" https://supabase.com/docs/guides/integrations/prisma#connection-pooling-with-supabase

Lovely Casauay
  • 406
  • 5
  • 4