MattiLehtinen / postgrator-cli

PostgreSQL, MySQL and MS SQL database schema migration tool using plain SQL and JS files
MIT License
41 stars 16 forks source link

Default env vars? #49

Closed bcomnes closed 2 years ago

bcomnes commented 2 years ago

Is there a set of default ENV vars postgrator-cli can look for when running migrations? I can pass them in easily as flags, but these tend to sneak into deployment logs which is less than ideal.

bcomnes commented 2 years ago

Looks like it does: https://github.com/MattiLehtinen/postgrator-cli/blob/1ba2b073e7ace0dffccbb23b8a47f36aed752cbd/test/postgrator-cli-tests.js#L247-L253

Want a docs PR?

perrin4869 commented 2 years ago

Those environment variables are documented here actually, and aren't used directly by postgrator-cli at all... so I am not sure how to document their usage ><;; The idea here was to have this library not get in the way of how the underlying clients work, so if the clients support any kind of environment variables, they should be picked up automatically...

perrin4869 commented 2 years ago

Any PR that improves documentation is very welcome!

bcomnes commented 2 years ago

Ah ok, I see. Maybe just a quick pointer to that part of the pg docs would save others some research. Thank you!