db-migrate / node-db-migrate

Database migration framework for node
Other
2.32k stars 360 forks source link

feat: Implemented default values for undefined env vars #766

Open kael-shipman opened 2 years ago

kael-shipman commented 2 years ago

@wzrdtales I'm not sure what to do to please the Semantic PR rule.... I've tried a number of edits to my commit and to the PR title, but none seem to have worked.

Also, I know we didn't really talk about this before I implemented, but I figured I'd take the risk.... lemme know if you see any issues with this feature.

kael-shipman commented 2 years ago

@wzrdtales anything wrong with merging this?

wzrdtales commented 2 years ago

I don't get your PR. What is it suppose to add? A default you have to configure is not a default. And why would you place a "default" value, instead of just providing the actual config?

kael-shipman commented 2 years ago

Without this feature, if you want to be able to use environment variables for configuration, then you must set all variables. This change allows you to configure default values that are used when a given environment variable is not set, which can be useful if, for example, you have a dev setup that uses mostly common values, but individual devs may want to make minor adjustments.

I can certainly understand that some people would not be interested in this, but of course they also don't have to use it or think about it. it's a change that enables functionality for people who want it without degrading current functionality in any way.