-
Notifications
You must be signed in to change notification settings - Fork 104
-
I want to use the Supabase database directly instead of a local database, to do that you could add support for a config option dbCommand
to get the database uri via stdout
{ "$schema": "./docs/schemas/latest/schema.json", // get the database uri using dotenv-cli npm package "dbCommand": "dotenv -- bash -c 'echo $DATABASE_URL'", // get database uri using doppler "dbCommand": "doppler secrets get --plain DATABASE_URL", }
This allows to get the database url using tools like Doppler or dotenv
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 3 replies
-
Thanks for the suggestion!
Out of curiosity: why do you want to connect directly to the remote database? Latencies will be higher.
Beta Was this translation helpful? Give feedback.
All reactions
-
Latency shouldn’t be a big issue, I prefer using a remote database to make local setup easier
Beta Was this translation helpful? Give feedback.
All reactions
-
It might be useful even in "local" contexts.
For instance we have a workstation which is shared by many users with one DB for each user.
The connection to each local DB is provided behind an environment variable (like so: $DEV_DB_URI
).
Being able to get the URI without writing it directly in the postgrestools.jsonc
file would allow us to commit the config file for everyone.
Beta Was this translation helpful? Give feedback.
All reactions
-
Makes total sense! Will add an issue for this 🫶🏼
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
I don't see a reference to the newly created issue so I'll link it here just so people know it exists:
Beta Was this translation helpful? Give feedback.