-
Notifications
You must be signed in to change notification settings - Fork 68
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
Multi config support #138
Multi config support #138
Conversation
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.
Looks very good I think it is an excellent feature since in most of the cases we have multiple versions of the "same" DB for pre-production, production, dev, etc..
Limit int `fig:"limit" default:"100"` | ||
} | ||
|
||
type Database struct { |
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.
💯
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.
LGTM! too, nice feature 🚀
Pull Request Template
Description
A user requested a very interesting feature on #137. Said feature is about to having multiple database configs, in order to have different database connection available defined in the
.dblab.yaml
file.Example:
I agreed on the usefulness of this feature since I wanted to implemented before.
Such a change could result in a non backward compatible feature, since some users would leave the
.dblab.yaml
file untouched after the next update. We can permit us such proceeding since we're still under 0.X.X version though, the API is not stable yet.The new way to consume this is:
$ dblab --config --cfg-name "prod"
--cfg-name
can be omitted the default values is gonna be first item on thedatabase
array:Fixes #137
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tested it under quite a few different config files versions and scenarios.
Checklist: