Comments
Sort by recent activity
Peter Thanks for your response. Here are the versions in my pom: <flyway.version>9.17.0</flyway.version> <spanner.plugin.version>9.17.0-beta</spanner.plugin.version>
As for your output, I see the same thing but if you review my post from 4/27 you'll notice that Flyway succeeds on firstConnect but then everything falls apart later in the process:
2023-04-27 16:46:10,795 INFO IAN=
REMOTE= [com.ingrid.ibp.SpannerAdmin] (main) ugh
Unsupported Database: Google Cloud Spanner 1.0 org.flywaydb.core.api.FlywayException: Unsupported Database: Google Cloud Spanner 1.0 at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForConnection(DatabaseTypeRegister.java:105) at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:75) at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:140) at org.flywaydb.core.Flyway.migrate(Flyway.java:129) at com.ingrid.ibp.SpannerAdmin.flywayDatasource(SpannerAdmin.java:156)
It looks like SORTED_DATABASE_TYPES in DatabaseTypeRegister is set to a new instance of PluginRegister:
private
static final List<DatabaseType> SORTED_DATABASE_TYPES = new
PluginRegister().getPlugins(DatabaseType.class).stream().sorted().collect(Collectors.toList());
As a result it ignores the configured values. Thanks Tom / comments
PeterThanks for your response. Here are the versions in my pom: <flyway.version>9.17.0</flyway.version> <spanner.plugin.version>9.17.0-beta</spanner.plugin.version>
As for your output...
Hello I have found a solution. In my 4/28 post I indicated that I "solved" the issue by: I downloaded the flyway source from git: https://github.com/flyway/flyway I
updated this file:
https://github.com/flyway/flyway/blob/main/flyway-core/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin
By adding:
org.flywaydb.database.spanner.SpannerDatabaseType
org.flywaydb.database.SpannerDatabaseExtension The I built a flyway snapshot, built my code with that, then ran the code. I have found a similar solution that does not require rebuilding Flyway source. In my java project I added the following file: src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin The contents of the file: org.flywaydb.database.spanner.SpannerDatabaseType org.flywaydb.database.SpannerDatabaseExtension org.flywaydb.core.internal.schemahistory.BaseAppliedMigration org.flywaydb.core.internal.resource.CoreResourceTypeProvider org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension org.flywaydb.core.internal.configuration.resolvers.EnvironmentVariableResolver org.flywaydb.core.internal.proprietaryStubs.CommandExtensionStub org.flywaydb.core.api.output.InfoHtmlRenderer org.flywaydb.core.internal.reports.json.InfoResultDeserializer org.flywaydb.core.api.output.MigrateHtmlRenderer org.flywaydb.core.internal.reports.json.MigrateResultDeserializer org.flywaydb.core.api.output.HoldingRenderer org.flywaydb.core.api.output.DashboardRenderer
With that all migrations, both Java and SQL, run successfully. Thanks Tom / comments
HelloI have found a solution. In my 4/28 post I indicated that I "solved" the issue by:I downloaded the flyway source from git: https://github.com/flyway/flywayI
updated this file:
https://github....
All right I got this to work but I don't think its the best solution. I downloaded the flyway source from git: https://github.com/flyway/flyway I
updated this file:
https://github.com/flyway/flyway/blob/main/flyway-core/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin
By adding:
org.flywaydb.database.spanner.SpannerDatabaseType org.flywaydb.database.SpannerDatabaseExtension The I built a flyway snapshot, built my code with that, then ran the code.
Everything worked. I'd
rather not continue to use a locally built snapshot. Is there some
configuration setting I can use yo add the GCP Spanner classes to the
services META-INF? Thanks Tom
/ comments
All rightI got this to work but I don't think its the best solution.I downloaded the flyway source from git: https://github.com/flyway/flywayI
updated this file:
https://github.com/flyway/flyway/...