diff --git a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayCreator.java b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayCreator.java index d7b1ac76f7a966..779b5394279bf2 100644 --- a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayCreator.java +++ b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayCreator.java @@ -59,7 +59,7 @@ public Flyway createFlyway(DataSource dataSource) { configure.cleanDisabled(flywayRuntimeConfig.cleanDisabled); configure.baselineOnMigrate(flywayRuntimeConfig.baselineOnMigrate); configure.validateOnMigrate(flywayRuntimeConfig.validateOnMigrate); - configure.validateMigrationNaming(true); + configure.validateMigrationNaming(flywayRuntimeConfig.validateMigrationNaming); List patterns = new ArrayList<>(2); //https://flywaydb.org/documentation/configuration/parameters/ignoreMigrationPatterns if (flywayRuntimeConfig.ignoreMissingMigrations) { diff --git a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayDataSourceRuntimeConfig.java b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayDataSourceRuntimeConfig.java index 1b49e442622c03..721093f3360994 100644 --- a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayDataSourceRuntimeConfig.java +++ b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/FlywayDataSourceRuntimeConfig.java @@ -180,4 +180,11 @@ public static final FlywayDataSourceRuntimeConfig defaultConfig() { */ @ConfigItem public Optional initSql = Optional.empty(); + + /** + * Whether to validate migrations and callbacks whose scripts do not obey the correct naming convention. A failure can be + * useful to check that errors such as case sensitivity in migration prefixes have been corrected. + */ + @ConfigItem + public boolean validateMigrationNaming; }