I'm trying to setup Flyway for Google Cloud Spanner (beta) using the flyway gradle plugin but it gets the error below when executing ./gradlew flywayinfo.
> Error occured while executing flywayInfo
No database found to handle jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>
build.gradle
plugins {
id 'java'
id 'org.flywaydb.flyway' version '7.13.0'
}
...
dependencies {
implementation(
'org.flywaydb:flyway-gcp-spanner:7.13.0-beta'
)
}
flyway {
url = 'jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>'
}
The values in the url correspond to my project and instance names.
I've also tried:
- using a service account key in the end of the URL
- adding the
com.google.cloud:google-cloud-spanner-jdbc:2.3.2JDBC driver dependency (implementation) - I'm behind a proxy but I have set it in my
gradle.propertieswithsystemProp.http.proxyHostandsystemProp.http.proxyPort(also for https)
Using Flyway CLI and the API programmatically works.