Skip to content

Add support for running a command to get the database connection string in postgrestools.jsonc #302

Open
@psteinroe

Description

@psteinroe

Discussed in #292

Originally posted by remorses April 1, 2025
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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions