fixup! Upgrade to Flyway 8.5.4

This commit is contained in:
Stephane Nicoll 2022-03-18 10:17:23 +01:00
parent 1e55ef2f97
commit 2fbb36bd04
3 changed files with 20 additions and 0 deletions

View File

@ -188,6 +188,9 @@ public class FlywayAutoConfiguration {
map.from(properties.getPlaceholders()).to(configuration::placeholders);
map.from(properties.getPlaceholderPrefix()).to(configuration::placeholderPrefix);
map.from(properties.getPlaceholderSuffix()).to(configuration::placeholderSuffix);
// No method reference for compatibility with Flyway version < 8.0
map.from(properties.getPlaceholderSeparator())
.to((placeHolderSeparator) -> configuration.placeholderSeparator(placeHolderSeparator));
map.from(properties.isPlaceholderReplacement()).to(configuration::placeholderReplacement);
map.from(properties.getSqlMigrationPrefix()).to(configuration::sqlMigrationPrefix);
map.from(properties.getSqlMigrationSuffixes()).as(StringUtils::toStringArray)

View File

@ -146,6 +146,11 @@ public class FlywayProperties {
*/
private String placeholderSuffix = "}";
/**
* Separator of default placeholders.
*/
private String placeholderSeparator;
/**
* Perform placeholder replacement in migration scripts.
*/
@ -538,6 +543,14 @@ public class FlywayProperties {
this.placeholderSuffix = placeholderSuffix;
}
public String getPlaceholderSeparator() {
return this.placeholderSeparator;
}
public void setPlaceholderSeparator(String placeholderSeparator) {
this.placeholderSeparator = placeholderSeparator;
}
public boolean isPlaceholderReplacement() {
return this.placeholderReplacement;
}

View File

@ -923,6 +923,10 @@
"name": "spring.flyway.lock-retry-count",
"defaultValue": 50
},
{
"name": "spring.flyway.placeholder-separator",
"defaultValue": ":"
},
{
"name": "spring.flyway.script-placeholder-prefix",
"defaultValue": "FP__"