Options

After migrating to flyway 10 from fly way 9.22.1, could not connect to the PostgraSQL DB

KeshaniKeshani Posts: 2 New member
edited November 8, 2023 10:39AM in Flyway (General Discussion)

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

  • Options
    Hi @Keshani,

    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
    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • Options
    KeshaniKeshani Posts: 2 New member
    edited November 9, 2023 6:55AM
    Hi @Jon_Kirkwood

    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.
  • Options

    I have noted in the release notes for v10.0.0 these two points:

    • Modularized database support in Flyway to allow greater flexibility. This includes; DB2, Derby, HSQLDB, Informix, PostgreSQL, CockroachDB, Redshift, SAP HANA, Snowflake and Sybase ASE. See Database Support page for your database for module dependency. If you are including Flyway in your project, either as a dependency or via the maven and gradle plugins please include the respective database module in your project configuration.
    • The lowest supported Gradle version for the Flyway Gradle plugin is now 7.6. This is due to a known issue with older Gradle versions where it cannot handle dependencies with multi-release chars containing Java 19 code.

     

    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

    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • Options
    Gradle has been updated with the latest Flyway release v10.1.0

    Can you update and verify if this issue persists in the current version?
    Jon Kirkwood | Technical Support Engineer | Redgate Software

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file