-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Describe the bug
Error connection to postgres after migration error
To Reproduce
Steps to reproduce the behavior:
-
Create migration files
-
supabase db push
Ask:
Do you want to push these migrations to the remote database?
yes
Applying migration 20250730155824_my_data.sql...
Applying migration 20250731151101_next_data.sql...
ERROR: syntax error at or near "" (SQLSTATE 42601)
At statement: 0
\set ON_ERROR_STOP off
^
Try rerunning the command with --debug to troubleshoot the error. -
supabase db push
-
See error
Connecting to remote database...
failed to connect to postgres: failed to connect tohost=aws-0-eu-central-2.pooler.supabase.com user=cli_login_postgres.myId database=postgres
: AfterConnect error (ERROR: permission denied to set role "postgres" (SQLSTATE 42501))
Try rerunning the command with --debug to troubleshoot the error.
6 !!!!!!!!!!!!!!!
supabase unlink
supabase link --project-ref myId
Initialising cli_login_postgres role...
Connecting to remote database...
failed to connect to postgres: failed to connect to host=aws-0-eu-central-2.pooler.supabase.com user=cli_login_postgres.myId database=postgres
: AfterConnect error (ERROR: permission denied to set role "postgres" (SQLSTATE 42501))
- !!!!! NO CONNECTION AT ALL !!!!!
- How to work??????
System information
Rerun the failing command with --create-ticket
flag.
- Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
- Version of OS:mac os
- Version of CLI: 2.33.7