Upgrade to Flyway 6.1.3

Closes gh-19266
This commit is contained in:
Stephane Nicoll
2019-12-31 10:47:41 +01:00
parent 5d1c844f21
commit a9b0b78cb2
4 changed files with 17 additions and 1 deletions

View File

@@ -175,6 +175,8 @@ public class FlywayAutoConfiguration {
map.from(locations).to(configuration::locations);
map.from(properties.getEncoding()).to(configuration::encoding);
map.from(properties.getConnectRetries()).to(configuration::connectRetries);
// No method reference for compatibility with Flyway 5.x
map.from(properties.getDefaultSchema()).to((schema) -> configuration.defaultSchema(schema));
map.from(properties.getSchemas()).as(StringUtils::toStringArray).to(configuration::schemas);
map.from(properties.getTable()).to(configuration::table);
// No method reference for compatibility with Flyway 5.x

View File

@@ -64,6 +64,11 @@ public class FlywayProperties {
*/
private int connectRetries;
/**
* Default schema name managed by Flyway (case-sensitive).
*/
private String defaultSchema;
/**
* Scheme names managed by Flyway (case-sensitive).
*/
@@ -316,6 +321,14 @@ public class FlywayProperties {
this.connectRetries = connectRetries;
}
public String getDefaultSchema() {
return this.defaultSchema;
}
public void setDefaultSchema(String defaultSchema) {
this.defaultSchema = defaultSchema;
}
public List<String> getSchemas() {
return this.schemas;
}

View File

@@ -51,6 +51,7 @@ class FlywayPropertiesTests {
.isEqualTo(configuration.getLocations());
assertThat(properties.getEncoding()).isEqualTo(configuration.getEncoding());
assertThat(properties.getConnectRetries()).isEqualTo(configuration.getConnectRetries());
assertThat(properties.getDefaultSchema()).isEqualTo(configuration.getDefaultSchema());
assertThat(properties.getSchemas()).isEqualTo(Arrays.asList(configuration.getSchemas()));
assertThat(properties.getTable()).isEqualTo(configuration.getTable());
assertThat(properties.getBaselineDescription()).isEqualTo(configuration.getBaselineDescription());

View File

@@ -61,7 +61,7 @@
<ehcache.version>2.10.6</ehcache.version>
<ehcache3.version>3.8.1</ehcache3.version>
<embedded-mongo.version>2.2.0</embedded-mongo.version>
<flyway.version>6.0.8</flyway.version>
<flyway.version>6.1.3</flyway.version>
<freemarker.version>2.3.29</freemarker.version>
<elasticsearch.version>6.8.5</elasticsearch.version>
<glassfish-el.version>3.0.3</glassfish-el.version>