I have installed the nodejs package globally.
After initializing via knex init and putting the file into a /db folder, commands such as knex migrate:latest won`t work anymore, because knex cannot find the file. Furthermore, knex creates the migrate and seed folder in my root directory
Any suggestions how to config knex that it always looks into the /db folder? Is there any way to do this via a node-script?
Thanks for your reply!
You can give your config file location on script
add this on package.json
"migrate": "yarn knex migrate:latest --knexfile src/config/knexfile.js",
My knexfile is in src/config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With