After migrating to flyway 10 from fly way 9.22.1, could not connect to the PostgraSQL DB
Keshani
Posts: 2 New member
Which version and edition of Flyway are you using?
Gradle plugin version 8.4
Upgraded from 9.22.1
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
N/A
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Gradle plugin
Gradle version 8.4
Java 17
Which database are you using? (Type & version)
PostgreSQL
Which operating system are you using?
Mac sonoma 14
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I tried to connect to the test db
What did you expect to see?
Successfully connect to the DB and run the integration tests.
What did you see instead?
I am getting following issue mentioning could not connect to the DB
org.flywaydb.core.api.FlywayException: No database found to handle jdbc:postgresql://******************* at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForUrl(DatabaseTypeRegister.java:54)
at org.flywaydb.core.api.configuration.ClassicConfiguration.setUrl(ClassicConfiguration.java:1304)
at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:1403)
at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:875)
at org.flywayd
Tagged:
Answers
Thank you for reaching out on the Redgate forums regarding your Flyway PostgreSQL inquiry.
From your comments, I understand this was an existing running command in v9.22.0 that is now failing in v10.0.0.
If you revert to v9.22.0 does the error go away?
The error snippet you have provided indicates that Flyway cannot determine a database from your JDBC string.
Are you able to share the flyway command you are running and jdbc string?
Are you also able to pass in a --verbose command and provide details of the full log output for our analysis?
I have generated this secure file link if not wanting to share details publicly. This link will be valid for 14 days.
https://files.red-gate.com/requests/ODi54o8J271M3phqSc8DT6
Thank you for replying to this question. When I revert it back to version9.22.3 it can succesfully connect to the test database. I went through couple of suggestion which is mentioned in this link as well . https://github.com/flyway/flyway/issues/3774. Unfortunately I cannot share the actual JDBC string outside the company.
I have noted in the release notes for v10.0.0 these two points:
Can you verify you are including the database module in your project configuration
The gradle version change should not be a concern as you have indicated you are using v8.4
I've also noted that v10.0.1 has an issue with the Flyway Gradle plug-in from being released. This should be resolved in a subsequent release.
A recommendation would be to stay on a working copy of v9.22.1 until this issue has been resolved.
Release notes for Flyway Engine available here:
https://documentation.red-gate.com/fd/release-notes-for-flyway-engine-179732572.html
Can you update and verify if this issue persists in the current version?