diff --git a/flyway/build.gradle b/flyway/build.gradle index ce145920..cc58041f 100644 --- a/flyway/build.gradle +++ b/flyway/build.gradle @@ -38,4 +38,6 @@ dependencies { testImplementation mnLogging.logback.classic compileOnly mnLogging.log4j + // flyway postgresql support + testRuntimeOnly libs.managed.flyway.postgresql } diff --git a/flyway/src/main/resources/META-INF/native-image/io.micronaut.flyway/micronaut-flyway/reflect-config.json b/flyway/src/main/resources/META-INF/native-image/io.micronaut.flyway/micronaut-flyway/reflect-config.json new file mode 100644 index 00000000..9f25a95f --- /dev/null +++ b/flyway/src/main/resources/META-INF/native-image/io.micronaut.flyway/micronaut-flyway/reflect-config.json @@ -0,0 +1,58 @@ +[ + { + "name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension", + "queryAllDeclaredMethods": true, + "allDeclaredFields": true, + "queryAllDeclaredConstructors": true, + "methods": [ + { + "name": "", + "parameterTypes": [ + + ] + }, + { + "name": "getBaselineMigrationPrefix", + "parameterTypes": [ + + ] + }, + { + "name": "setBaselineMigrationPrefix", + "parameterTypes": [ + "java.lang.String" + ] + } + ] + }, + { + "name": "org.flywaydb.core.extensibility.ConfigurationExtension", + "queryAllDeclaredMethods": true + }, + { + "name": "org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension", + "queryAllDeclaredMethods": true, + "allDeclaredFields": true, + "queryAllDeclaredConstructors": true, + "methods": [ + { + "name": "", + "parameterTypes": [ + + ] + }, + { + "name": "getClean", + "parameterTypes": [ + + ] + }, + { + "name": "setClean", + "parameterTypes": [ + "org.flywaydb.core.internal.command.clean.CleanModel" + ] + } + ] + } +] \ No newline at end of file diff --git a/flyway/src/test/groovy/io/micronaut/flyway/ValidatePatternTypeConverterSpec.groovy b/flyway/src/test/groovy/io/micronaut/flyway/ValidatePatternTypeConverterSpec.groovy index c7b9cf4c..f0ebe320 100644 --- a/flyway/src/test/groovy/io/micronaut/flyway/ValidatePatternTypeConverterSpec.groovy +++ b/flyway/src/test/groovy/io/micronaut/flyway/ValidatePatternTypeConverterSpec.groovy @@ -4,7 +4,7 @@ import org.flywaydb.core.api.ErrorCode import org.flywaydb.core.api.FlywayException import org.flywaydb.core.api.MigrationState import org.flywaydb.core.api.pattern.ValidatePattern -import org.flywaydb.core.internal.license.FlywayTeamsUpgradeRequiredException +import org.flywaydb.core.internal.license.FlywayRedgateEditionRequiredException import spock.lang.Specification /** @@ -51,10 +51,10 @@ class ValidatePatternTypeConverterSpec extends Specification { validatePatternTypeConverter.convert("repeatable:*", ValidatePattern.class) then: - def e = thrown(FlywayTeamsUpgradeRequiredException) + def e = thrown(FlywayRedgateEditionRequiredException) e.errorCode == ErrorCode.ERROR - e.message == 'Flyway Teams Edition upgrade required: ignoreMigrationPattern with type \'repeatable\' is not supported by Flyway Community Edition\n' + - 'Try Flyway Teams Edition for free: https://rd.gt/2VzHpkY' + e.message == 'Flyway Redgate Edition Required: ignoreMigrationPattern with type \'repeatable\' is not supported by OSS Edition\n' + + 'Download Redgate Edition for free: https://rd.gt/2VzHpkY' } void "test versioned string conversion"() { @@ -65,10 +65,10 @@ class ValidatePatternTypeConverterSpec extends Specification { validatePatternTypeConverter.convert("versioned:missing", ValidatePattern.class) then: - def e = thrown(FlywayTeamsUpgradeRequiredException) + def e = thrown(FlywayRedgateEditionRequiredException) e.errorCode == ErrorCode.ERROR - e.message == 'Flyway Teams Edition upgrade required: ignoreMigrationPattern with type \'versioned\' is not supported by Flyway Community Edition\n' + - 'Try Flyway Teams Edition for free: https://rd.gt/2VzHpkY' + e.message == 'Flyway Redgate Edition Required: ignoreMigrationPattern with type \'versioned\' is not supported by OSS Edition\n' + + 'Download Redgate Edition for free: https://rd.gt/2VzHpkY' } void "test missing string conversion"() { diff --git a/gradle.properties b/gradle.properties index e0b0783f..537cdeee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=6.3.1-SNAPSHOT +projectVersion=7.0.0-SNAPSHOT projectGroup=io.micronaut.flyway diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a9c94cd5..5d348a8f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,21 +1,20 @@ [versions] micronaut-docs = "2.0.0" - micronaut = "4.2.3" micronaut-logging = "1.1.2" -micronaut-platform = "4.1.5" -micronaut-test = "4.0.1" +micronaut-platform = "4.2.3" +micronaut-test = "4.1.1" micronaut-serde = "2.7.0" micronaut-sql = "5.4.0" micronaut-gradle-plugin = "4.2.1" -managed-flyway = "9.22.3" +managed-flyway = "10.0.0" gorm-hibernate = "8.0.2" graal-svm = "23.1.1" persistence-api = '2.2' -groovy = "4.0.13" +groovy = "4.0.17" spock = "2.3-groovy-4.0" testcontainers = "1.19.3" @@ -29,6 +28,7 @@ managed-flyway = { module = "org.flywaydb:flyway-core", version.ref = "managed-f managed-flyway-mysql = { module = "org.flywaydb:flyway-mysql", version.ref = "managed-flyway" } managed-flyway-sqlserver = { module = "org.flywaydb:flyway-sqlserver", version.ref = "managed-flyway" } managed-flyway-oracle = { module = "org.flywaydb:flyway-database-oracle", version.ref = "managed-flyway" } +managed-flyway-postgresql = { module = "org.flywaydb:flyway-database-postgresql", version.ref = "managed-flyway" } grails-datastore-gorm-hibernate5 = { module = "org.grails:grails-datastore-gorm-hibernate5", version.ref = "gorm-hibernate" } graal-svm = { module = "org.graalvm.nativeimage:svm", version.ref = "graal-svm" }