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

Display the connection url #430

Closed
flyway opened this issue Jun 25, 2013 · 4 comments
Closed

Display the connection url #430

flyway opened this issue Jun 25, 2013 · 4 comments
Labels

Comments

@ghost
Copy link
Collaborator

@ghost ghost commented Jun 25, 2013

Original author: rotscher...@gmail.com (January 22, 2013 10:22:00)

Display the url and user which is used to connect to the database. Especially when having multiple database instances it's always a blind flight if really the correct profile/configuration is activated.

See attached patch as a proposal how this could be implemented.

Original issue: http://code.google.com/p/flyway/issues/detail?id=422

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on January 22, 2013 11:59:22
Hi Roger,

thanks for your suggestion. The however won't work as users are able to pass any DataSource object they wish to Flyway.

A workaround could be for you to wrap your DataSource object with a class that would print out the url and user when DataSource.getConnection is called.

Cheers
Axel

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on January 22, 2013 13:28:41
Well, a little more research shows that it might be possible after all: http://stackoverflow.com/questions/5718952/how-to-get-database-url-from-java-sql-connection

Reopening.

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From rotscher...@gmail.com on February 02, 2013 15:29:52
Hi Axel,

I somehow missed your second post :-(

However, when using maven, I don't know how to use a different datasource implementation without subclassing all the Mojos (and I'd like to avoid that).

I'll have a look at this post from stackoverflow. I'll come up with a pull request as soon as I have a solution.

Cheers
Rotsch

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From rotscher...@gmail.com on February 08, 2013 10:45:46
The connection thing only works when the connection can be established, that means when the configuration is correct. When the configuratin is not correct there are exceptions and the connection is null. And then I'd like to see the configuration for debugging it.

So, I have another proposal:
https://github.com/rotscher/flyway/commit/964f8c17c27111d014e9b25c30542a8e96722c8f

Cheers
Rotsch

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

Successfully merging a pull request may close this issue.

None yet
0 participants
You can’t perform that action at this time.