cli icon indicating copy to clipboard operation
cli copied to clipboard

Add db:info command which returns database configuration

Open reilg opened this issue 4 years ago • 2 comments

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.

reilg avatar Oct 14 '20 18:10 reilg

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.

stale[bot] avatar Dec 25 '20 13:12 stale[bot]

The idea is great! Just make the output a little prettier and add some tests and we can add this.

Americas avatar Nov 06 '21 15:11 Americas