Skip to content

Commit 278c7a5

Browse files
committed
Merge pull request #44460 from bekoenig
* pr/44460: Remove obsolete hints for Flyway Teams features Closes gh-44460
2 parents e1f45c5 + 23fd79f commit 278c7a5

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ private void configureProperties(FluentConfiguration configuration, FlywayProper
302302
.to((suffix) -> configuration.scriptPlaceholderSuffix(suffix));
303303
configureExecuteInTransaction(configuration, properties, map);
304304
map.from(properties::getLoggers).to((loggers) -> configuration.loggers(loggers));
305-
// Flyway Teams properties
306305
map.from(properties.getBatch()).to((batch) -> configuration.batch(batch));
307306
map.from(properties.getDryRunOutput()).to((dryRunOutput) -> configuration.dryRunOutput(dryRunOutput));
308307
map.from(properties.getErrorOverrides())

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public class FlywayProperties {
275275
private String[] loggers = { "slf4j" };
276276

277277
/**
278-
* Whether to batch SQL statements when executing them. Requires Flyway Teams.
278+
* Whether to batch SQL statements when executing them.
279279
*/
280280
private Boolean batch;
281281

@@ -292,12 +292,12 @@ public class FlywayProperties {
292292
private String[] errorOverrides;
293293

294294
/**
295-
* Whether to stream SQL migrations when executing them. Requires Flyway Teams.
295+
* Whether to stream SQL migrations when executing them.
296296
*/
297297
private Boolean stream;
298298

299299
/**
300-
* Properties to pass to the JDBC driver. Requires Flyway Teams.
300+
* Properties to pass to the JDBC driver.
301301
*/
302302
private Map<String, String> jdbcProperties = new HashMap<>();
303303

@@ -308,25 +308,23 @@ public class FlywayProperties {
308308

309309
/**
310310
* Whether Flyway should output a table with the results of queries when executing
311-
* migrations. Requires Flyway Teams.
311+
* migrations.
312312
*/
313313
private Boolean outputQueryResults;
314314

315315
/**
316316
* Whether Flyway should skip executing the contents of the migrations and only update
317-
* the schema history table. Requires Flyway teams.
317+
* the schema history table.
318318
*/
319319
private Boolean skipExecutingMigrations;
320320

321321
/**
322-
* Ignore migrations that match this comma-separated list of patterns when validating
323-
* migrations. Requires Flyway Teams.
322+
* List of patterns that identify migrations to ignore when performing validation.
324323
*/
325324
private List<String> ignoreMigrationPatterns;
326325

327326
/**
328-
* Whether to attempt to automatically detect SQL migration file encoding. Requires
329-
* Flyway Teams.
327+
* Whether to attempt to automatically detect SQL migration file encoding.
330328
*/
331329
private Boolean detectEncoding;
332330

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java

+17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.flywaydb.core.api.callback.Event;
3434
import org.flywaydb.core.api.configuration.FluentConfiguration;
3535
import org.flywaydb.core.api.migration.JavaMigration;
36+
import org.flywaydb.core.api.pattern.ValidatePattern;
3637
import org.flywaydb.core.internal.license.FlywayEditionUpgradeRequiredException;
3738
import org.flywaydb.database.oracle.OracleConfigurationExtension;
3839
import org.flywaydb.database.postgresql.PostgreSQLConfigurationExtension;
@@ -915,6 +916,22 @@ void shouldRegisterResourceHints() {
915916
assertThat(RuntimeHintsPredicates.resource().forResource("db/migration/V1__init.sql")).accepts(runtimeHints);
916917
}
917918

919+
@Test
920+
void detectEncodingCorrectlyMapped() {
921+
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
922+
.withPropertyValues("spring.flyway.detect-encoding=true")
923+
.run((context) -> assertThat(context.getBean(Flyway.class).getConfiguration().isDetectEncoding())
924+
.isEqualTo(true));
925+
}
926+
927+
@Test
928+
void ignoreMigrationPatternsCorrectlyMapped() {
929+
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
930+
.withPropertyValues("spring.flyway.ignore-migration-patterns=*:missing")
931+
.run((context) -> assertThat(context.getBean(Flyway.class).getConfiguration().getIgnoreMigrationPatterns())
932+
.containsExactly(ValidatePattern.fromPattern("*:missing")));
933+
}
934+
918935
private ContextConsumer<AssertableApplicationContext> validateFlywayTeamsPropertyOnly(String propertyName) {
919936
return (context) -> {
920937
assertThat(context).hasFailed();

0 commit comments

Comments
 (0)