Supabase link giving me permission denied

npx supabase link gives me:
Selected project: <project id>
WARN: no SMS provider is enabled. Disabling phone login
Initialising login role...
Connecting to remote database...
failed to fetch storage migration: ERROR: permission denied for table migrations (SQLSTATE 42501)
Finished supabase link.
Selected project: <project id>
WARN: no SMS provider is enabled. Disabling phone login
Initialising login role...
Connecting to remote database...
failed to fetch storage migration: ERROR: permission denied for table migrations (SQLSTATE 42501)
Finished supabase link.
I am not sure what to do. This issue (https://github.com/supabase/supabase/issues/21615) and this related one (https://github.com/supabase/supabase/issues/10982) says to: 1. Your project has been upgraded to the latest version (check here) 2. You are using the latest Supabase CLI 3. Your postgres user has the supabase_functions_admin privilege I am unable to do (1) for the moment (I cannot afford to interrupt my website). (2) is true, I am using the latest CLI. And I don't think (3) is relevant? Isn't the postgres user having full privileges? At any rate it doesn't look like the role exists anymore
3 Replies
xananax
xananaxOP5d ago
It doesn't even ask me for a pass; shouldn't it? I tried also
SUPABASE_DB_PASSWORD="mypass" npx supabase link --project-ref "myproject"
SUPABASE_DB_PASSWORD="mypass" npx supabase link --project-ref "myproject"
same effect Tried other projects, same result for all of them I tried a stop --no-backup and a start, but same
ihm40
ihm404d ago
Supabase Docs | Troubleshooting | Database API 42501 errors
Supabase is the Postgres development platform providing all the backend features you need to build a product.
xananax
xananaxOP4d ago
Thanks, but unfortunately none of this applies. I'll still double check anyway in case my assumptions are wrong! Hopefully they are

Did you find this page helpful?