Skip to content
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

Add command to test DB connection #1808

Closed
Bilge opened this issue Jun 16, 2020 · 4 comments · Fixed by #1822
Closed

Add command to test DB connection #1808

Bilge opened this issue Jun 16, 2020 · 4 comments · Fixed by #1822
Milestone

Comments

@Bilge
Copy link
Contributor

Bilge commented Jun 16, 2020

There should be a command that just tests connectivity.

@garas
Copy link
Member

garas commented Jun 18, 2020

There is already phinx test command which verify configuration file and connection.

https://github.com/cakephp/phinx/blob/master/src/Phinx/Console/Command/Test.php

@Bilge
Copy link
Contributor Author

Bilge commented Jun 18, 2020 via email

@garas
Copy link
Member

garas commented Jun 18, 2020

Specify environment and it will be checked

// validate environment connection
$environment->getAdapter()->connect();

@Bilge
Copy link
Contributor Author

Bilge commented Jun 18, 2020

I see. Probably that should be stated explicitly in the command line help? It's not very intuitive currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants