Skip to content

Config: Allow default value for when environment variables not set #765

Open
@kael-shipman

Description

@kael-shipman

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Current behavior

You can specify environment variables for config, but if the environment variable is not set, you can't provide a default (fallback) value.

Expected behavior

Should be able to provide { "ENV": "MY_ENV_VAR", "default": "some-value" } as a value, and when MY_ENV_VAR is not set, some-value should be used.

Environment


db-migrate version: 0.11.13
db-migrate driver with versions: mysql v2.2.0

Additional information:
- Node version: v17.3.0
- Platform: Linux (Ubuntu 20.04.3)

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