-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Override knexfile options with CLI options #4047
Conversation
There's a test failing, could you please take a look? |
@KoryNunn Could you please also update documentation in https://github.com/knex/documentation? |
config.connection = opts.connection; | ||
} | ||
|
||
if (opts.migrationsDirectory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there is a way to make all overrides case-insensitive. Probably we can do check on lowercased entry pairs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I can understand, the goal is to lower case the properties in options object before merge with config in knexfile ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But some options are camelCase, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmh, I will check that this week.
@KoryNunn Do you need any help with this? |
# Conflicts: # bin/cli.js
Hi just a quick update. I no longer use knex, and as such have no capability for valuable input. I'll leave this PR open in case it is of use to anyone else, but also not against it being closed. |
It's ok no problem at all, I will finish it ! |
@kibertoad |
Yeah, looks good, and we can close 5006 too. |
Released in 1.0.5 |
This PR allows overriding options in a passed knexfile with other options passed to the CLI.