New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using config-file and config-value #891
Comments
I'm still reading through https://github.com/salsita/node-pg-migrate/blob/master/bin/node-pg-migrate, specifically the I discovered it'll work if I install For config/database.json npm i config
NODE_ENV=database nix node-pg-migrate up --config-value dev To me this suggests a couple things:
Disclaimer: I don't perform much Node development. All of these libraries are fairly new to me. Feel free to set me straight. Likewise this can work with modules as well: // config/database.js
module.exports = {
"dev": {
"database": "dev",
"user": "dev-user",
...
},
"test": {
"database": "test"
...
}
} NODE_ENV=database npx node-pg-migrate up --config-value test |
I am suspicious that downloading the |
How to properly use
config-value
?config/database.json
Given the documentation, my understanding is migrations can run against a specified database via
config-value
and loaded from a non-standard json file viaconfig-file
. However, the following command fails at loading the migration:npx node-pg-migrate up --config-file config/database.json --config-value dev
For verification, a simplified config/database.json works without a named key:
npx node-pg-migrate up --config-file config/database.json
However, the following also results in an error when using a db key:
The text was updated successfully, but these errors were encountered: