Supabase Postgres Database Integration #4100
Replies: 3 comments 6 replies
-
By default in Postgres installed locally, the postgres user is admin. But I think that is not the case for supabase. But you can do: GRANT supabase_admin TO postgres; That is a quick fix. For other options that give fewer permissions, check here: https://supabase.com/docs/guides/cli/managing-environments#permission-denied-on-db-remote-commit |
Beta Was this translation helpful? Give feedback.
-
It looks like a connection to Supabase with direct DB access via IPv4 and pgBouncer doesn't work anymore (since January 26th 2024): I tried to install Medusa following this guide: But the command from Medusa example doesn't work anymore: The new URI format is: But it didn't work when I tried it like this: I tried some other formats but neither works. I've tested the connection with other DB tools and all works. Any ideas? I've created an issue: #6535 |
Beta Was this translation helpful? Give feedback.
-
I have found a solution to this problem. It is URL Encoding. A connection to Supabase with direct DB access via IPv4 and pgBouncer doesn't work anymore (since January 26th 2024). The new URI format is:
To spin up a Medusa backend use:
NB: If your password has special characters, use an online url encoder to encode it. Everything works fine from there. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am brand new when it comes to SQL databases as I'm coming from a heavy Firebase background. I assumed all I would have to do to set up Supabase as the Postgres DB would simply be changing the database type and replacing the connection string, e.g.:
However, when running either seed or medusa migrations run, I get the following error:
QueryFailedError: must be owner of event trigger pgsodium_trg_mask_update
I believe it has something to do with medusa not having access to certain records in the database, namely pgsodium, although I assumed by providing a connection string with the db password that medusa would have admin access. Can someone help me figure out where I am going wrong?
Beta Was this translation helpful? Give feedback.
All reactions