mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Upgrade to Flyway 9.14.1
Closes gh-34080
This commit is contained in:
parent
5dc6592b12
commit
238b85fabc
@ -247,6 +247,7 @@ public class FlywayAutoConfiguration {
|
||||
map.from(properties.getIgnoreMigrationPatterns()).whenNot(List::isEmpty)
|
||||
.as((patterns) -> patterns.toArray(new String[0])).to(configuration::ignoreMigrationPatterns);
|
||||
map.from(properties.getDetectEncoding()).to(configuration::detectEncoding);
|
||||
map.from(properties.isExecuteInTransaction()).to(configuration::executeInTransaction);
|
||||
}
|
||||
|
||||
private void configureSqlServerKerberosLoginFile(FluentConfiguration configuration,
|
||||
|
@ -171,7 +171,7 @@ public class FlywayProperties {
|
||||
/**
|
||||
* Target version up to which migrations should be considered.
|
||||
*/
|
||||
private String target;
|
||||
private String target = "latest";
|
||||
|
||||
/**
|
||||
* Login user of the database to migrate.
|
||||
@ -362,6 +362,11 @@ public class FlywayProperties {
|
||||
*/
|
||||
private String scriptPlaceholderSuffix = "__";
|
||||
|
||||
/**
|
||||
* Whether Flyway should execute SQL within a transaction.
|
||||
*/
|
||||
private boolean executeInTransaction;
|
||||
|
||||
public boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
@ -842,4 +847,12 @@ public class FlywayProperties {
|
||||
this.scriptPlaceholderSuffix = scriptPlaceholderSuffix;
|
||||
}
|
||||
|
||||
public boolean isExecuteInTransaction() {
|
||||
return this.executeInTransaction;
|
||||
}
|
||||
|
||||
public void setExecuteInTransaction(boolean executeInTransaction) {
|
||||
this.executeInTransaction = executeInTransaction;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class FlywayPropertiesTests {
|
||||
assertThat(properties.getSqlMigrationSeparator()).isEqualTo(configuration.getSqlMigrationSeparator());
|
||||
assertThat(properties.getRepeatableSqlMigrationPrefix())
|
||||
.isEqualTo(configuration.getRepeatableSqlMigrationPrefix());
|
||||
assertThat(properties.getTarget()).isEqualTo(configuration.getTarget());
|
||||
assertThat(MigrationVersion.fromVersion(properties.getTarget())).isEqualTo(configuration.getTarget());
|
||||
assertThat(configuration.getInitSql()).isNull();
|
||||
assertThat(properties.getInitSqls()).isEmpty();
|
||||
assertThat(properties.isBaselineOnMigrate()).isEqualTo(configuration.isBaselineOnMigrate());
|
||||
@ -107,7 +107,8 @@ class FlywayPropertiesTests {
|
||||
ignoreProperties(configuration, "callbacks", "classLoader", "dataSource", "javaMigrations",
|
||||
"javaMigrationClassProvider", "pluginRegister", "resourceProvider", "resolvers");
|
||||
// Properties we don't want to expose
|
||||
ignoreProperties(configuration, "resolversAsClassNames", "callbacksAsClassNames", "loggers", "driver");
|
||||
ignoreProperties(configuration, "resolversAsClassNames", "callbacksAsClassNames", "loggers", "driver",
|
||||
"modernConfig", "resolvedEnvironments");
|
||||
// Handled by the conversion service
|
||||
ignoreProperties(configuration, "baselineVersionAsString", "encodingAsString", "locationsAsStrings",
|
||||
"targetAsString");
|
||||
|
@ -243,7 +243,7 @@ bom {
|
||||
]
|
||||
}
|
||||
}
|
||||
library("Flyway", "9.5.1") {
|
||||
library("Flyway", "9.14.1") {
|
||||
group("org.flywaydb") {
|
||||
modules = [
|
||||
"flyway-core",
|
||||
|
Loading…
Reference in New Issue
Block a user