cli
cli copied to clipboard
Add db:info command which returns database configuration
Pull Request check-list
Please make sure to review and check all of these items:
- [x] Does
npm run test
pass with this change (including linting)? - [ ] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
- [ ] Have you added new tests to prevent regressions?
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
Description of change
I wanted to add a way to quickly check if a command would be performed against the correct database connection.
Add the db:info
command.
Outputs:
Config {
username: 'root',
password: '***',
database: 'test_database',
host: 'localhost',
port: '3306',
dialect: 'mysql'
}
This isn't really very polished and no additional tests have been written to cover the command. I mainly wanted to open this PR to get comments and/or suggestions since I'm currently using this version for my current projects.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The idea is great! Just make the output a little prettier and add some tests and we can add this.