Upgrade to Flyway 8.0.3

Closes gh-28572
pull/28605/head
Stephane Nicoll 3 years ago
parent bbb9a0df12
commit 629e1d3ac5

@ -241,15 +241,18 @@ public class FlywayAutoConfiguration {
map.from(properties.getJdbcProperties()).whenNot(Map::isEmpty) map.from(properties.getJdbcProperties()).whenNot(Map::isEmpty)
.to((jdbcProperties) -> configuration.jdbcProperties(jdbcProperties)); .to((jdbcProperties) -> configuration.jdbcProperties(jdbcProperties));
// No method reference for compatibility with Flyway 6.x // No method reference for compatibility with Flyway 6.x
map.from(properties.getKerberosConfigFile())
.to((configFile) -> configuration.kerberosConfigFile(configFile));
// No method reference for compatibility with Flyway 6.x
map.from(properties.getOracleKerberosCacheFile()) map.from(properties.getOracleKerberosCacheFile())
.to((cacheFile) -> configuration.oracleKerberosCacheFile(cacheFile)); .to((cacheFile) -> configuration.oracleKerberosCacheFile(cacheFile));
// No method reference for compatibility with Flyway 6.x // No method reference for compatibility with Flyway 6.x
map.from(properties.getOracleKerberosConfigFile())
.to((configFile) -> configuration.oracleKerberosConfigFile(configFile));
// No method reference for compatibility with Flyway 6.x
map.from(properties.getOutputQueryResults()) map.from(properties.getOutputQueryResults())
.to((outputQueryResults) -> configuration.outputQueryResults(outputQueryResults)); .to((outputQueryResults) -> configuration.outputQueryResults(outputQueryResults));
// No method reference for compatibility with Flyway 6.x // No method reference for compatibility with Flyway 6.x
map.from(properties.getSqlServerKerberosLoginFile()).to((sqlServerKerberosLoginFile) -> configuration
.sqlServerKerberosLoginFile(sqlServerKerberosLoginFile));
// No method reference for compatibility with Flyway 6.x
map.from(properties.getSkipExecutingMigrations()) map.from(properties.getSkipExecutingMigrations())
.to((skipExecutingMigrations) -> configuration.skipExecutingMigrations(skipExecutingMigrations)); .to((skipExecutingMigrations) -> configuration.skipExecutingMigrations(skipExecutingMigrations));
// No method reference for compatibility with Flyway < 7.8 // No method reference for compatibility with Flyway < 7.8

@ -335,14 +335,14 @@ public class FlywayProperties {
private Map<String, String> jdbcProperties = new HashMap<>(); private Map<String, String> jdbcProperties = new HashMap<>();
/** /**
* Path of the Oracle Kerberos cache file. Requires Flyway Teams. * Path of the Kerberos config file. Requires Flyway Teams.
*/ */
private String oracleKerberosCacheFile; private String kerberosConfigFile;
/** /**
* Path of the Oracle Kerberos config file. Requires Flyway Teams. * Path of the Oracle Kerberos cache file. Requires Flyway Teams.
*/ */
private String oracleKerberosConfigFile; private String oracleKerberosCacheFile;
/** /**
* Location of the Oracle Wallet, used to sign-in to the database automatically. * Location of the Oracle Wallet, used to sign-in to the database automatically.
@ -356,6 +356,11 @@ public class FlywayProperties {
*/ */
private Boolean outputQueryResults; private Boolean outputQueryResults;
/**
* Path to the SQL Server Kerberos login file. Requires Flyway Teams.
*/
private String sqlServerKerberosLoginFile;
/** /**
* Whether Flyway should skip executing the contents of the migrations and only update * Whether Flyway should skip executing the contents of the migrations and only update
* the schema history table. Requires Flyway teams. * the schema history table. Requires Flyway teams.
@ -856,6 +861,14 @@ public class FlywayProperties {
this.jdbcProperties = jdbcProperties; this.jdbcProperties = jdbcProperties;
} }
public String getKerberosConfigFile() {
return this.kerberosConfigFile;
}
public void setKerberosConfigFile(String kerberosConfigFile) {
this.kerberosConfigFile = kerberosConfigFile;
}
public String getOracleKerberosCacheFile() { public String getOracleKerberosCacheFile() {
return this.oracleKerberosCacheFile; return this.oracleKerberosCacheFile;
} }
@ -864,12 +877,15 @@ public class FlywayProperties {
this.oracleKerberosCacheFile = oracleKerberosCacheFile; this.oracleKerberosCacheFile = oracleKerberosCacheFile;
} }
@DeprecatedConfigurationProperty(replacement = "spring.flyway.kerberos-config-file")
@Deprecated
public String getOracleKerberosConfigFile() { public String getOracleKerberosConfigFile() {
return this.oracleKerberosConfigFile; return getKerberosConfigFile();
} }
@Deprecated
public void setOracleKerberosConfigFile(String oracleKerberosConfigFile) { public void setOracleKerberosConfigFile(String oracleKerberosConfigFile) {
this.oracleKerberosConfigFile = oracleKerberosConfigFile; setKerberosConfigFile(oracleKerberosConfigFile);
} }
public Boolean getOutputQueryResults() { public Boolean getOutputQueryResults() {
@ -880,6 +896,14 @@ public class FlywayProperties {
this.outputQueryResults = outputQueryResults; this.outputQueryResults = outputQueryResults;
} }
public String getSqlServerKerberosLoginFile() {
return this.sqlServerKerberosLoginFile;
}
public void setSqlServerKerberosLoginFile(String sqlServerKerberosLoginFile) {
this.sqlServerKerberosLoginFile = sqlServerKerberosLoginFile;
}
public Boolean getSkipExecutingMigrations() { public Boolean getSkipExecutingMigrations() {
return this.skipExecutingMigrations; return this.skipExecutingMigrations;
} }

@ -603,17 +603,25 @@ class FlywayAutoConfigurationTests {
} }
@Test @Test
void oracleKerberosCacheFileIsCorrectlyMapped() { void kerberosConfigFileIsCorrectlyMapped() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.flyway.oracle-kerberos-cache-file=/tmp/cache") .withPropertyValues("spring.flyway.kerberos-config-file=/tmp/config")
.run(validateFlywayTeamsPropertyOnly("oracle.kerberosCacheFile")); .run(validateFlywayTeamsPropertyOnly("kerberosConfigFile"));
} }
@Test @Test
void oracleKerberosConfigFileIsCorrectlyMapped() { @Deprecated
void oracleKerberosConfigFileIsCorrectlyMappedToReplacementProperty() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.flyway.oracle-kerberos-config-file=/tmp/config") .withPropertyValues("spring.flyway.oracle-kerberos-config-file=/tmp/config")
.run(validateFlywayTeamsPropertyOnly("oracle.kerberosConfigFile")); .run(validateFlywayTeamsPropertyOnly("kerberosConfigFile"));
}
@Test
void oracleKerberosCacheFileIsCorrectlyMapped() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.flyway.oracle-kerberos-cache-file=/tmp/cache")
.run(validateFlywayTeamsPropertyOnly("oracle.kerberosCacheFile"));
} }
@Test @Test
@ -623,6 +631,13 @@ class FlywayAutoConfigurationTests {
.run(validateFlywayTeamsPropertyOnly("outputQueryResults")); .run(validateFlywayTeamsPropertyOnly("outputQueryResults"));
} }
@Test
void sqlServerKerberosLoginFileIsCorrectlyMapped() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.flyway.sql-server-kerberos-login-file=/tmp/config")
.run(validateFlywayTeamsPropertyOnly("sqlServer.kerberosLoginFile"));
}
@Test @Test
void skipExecutingMigrationsIsCorrectlyMapped() { void skipExecutingMigrationsIsCorrectlyMapped() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)

@ -309,7 +309,7 @@ bom {
] ]
} }
} }
library("Flyway", "8.0.2") { library("Flyway", "8.0.3") {
group("org.flywaydb") { group("org.flywaydb") {
modules = [ modules = [
"flyway-core" "flyway-core"

Loading…
Cancel
Save