db-migrate / db-migrate/node-db-migrate
Config: Allow default value for when environment variables not set
Open
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
## I'm submitting a...
- [ ] Bug report
- [x] 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)
Contributor guide
Assessment
This issue has not been assessed yet.