Skip to content

Support reading database connection string from environment variable #1319

@chiawendt

Description

@chiawendt

Is your feature request related to a problem? Please describe.

Connection strings with credentials must currently be passed via CLI args, which can leak through shell history, CI logs, crash dumps, or ps listings.

Describe the solution you'd like

Allow migrate to read the connection string in this order:

  1. -database arg
  2. Env var specified by -env flag (default: DATABASE_URL)

Metadata

Metadata

Assignees

No one assigned

    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