|
|
|
|
@ -19,6 +19,8 @@ package org.springframework.boot.autoconfigure.flyway;
@@ -19,6 +19,8 @@ package org.springframework.boot.autoconfigure.flyway;
|
|
|
|
|
import java.io.File; |
|
|
|
|
import java.nio.charset.Charset; |
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
|
import java.time.Duration; |
|
|
|
|
import java.time.temporal.ChronoUnit; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Collections; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
@ -27,6 +29,7 @@ import java.util.Map;
@@ -27,6 +29,7 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
|
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; |
|
|
|
|
import org.springframework.boot.convert.DurationUnit; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Configuration properties for Flyway database migrations. |
|
|
|
|
@ -73,6 +76,13 @@ public class FlywayProperties {
@@ -73,6 +76,13 @@ public class FlywayProperties {
|
|
|
|
|
*/ |
|
|
|
|
private int connectRetries; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Maximum time between retries when attempting to connect to the database. If a |
|
|
|
|
* duration suffix is not specified, seconds will be used. |
|
|
|
|
*/ |
|
|
|
|
@DurationUnit(ChronoUnit.SECONDS) |
|
|
|
|
private Duration connectRetriesInterval; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Maximum number of retries when trying to obtain a lock. |
|
|
|
|
*/ |
|
|
|
|
@ -365,6 +375,16 @@ public class FlywayProperties {
@@ -365,6 +375,16 @@ public class FlywayProperties {
|
|
|
|
|
*/ |
|
|
|
|
private String stateScriptPrefix; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Prefix of placeholders in migration scripts. |
|
|
|
|
*/ |
|
|
|
|
private String scriptPlaceholderPrefix; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Suffix of placeholders in migration scripts. |
|
|
|
|
*/ |
|
|
|
|
private String scriptPlaceholderSuffix; |
|
|
|
|
|
|
|
|
|
public boolean isEnabled() { |
|
|
|
|
return this.enabled; |
|
|
|
|
} |
|
|
|
|
@ -417,6 +437,14 @@ public class FlywayProperties {
@@ -417,6 +437,14 @@ public class FlywayProperties {
|
|
|
|
|
this.connectRetries = connectRetries; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Duration getConnectRetriesInterval() { |
|
|
|
|
return this.connectRetriesInterval; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setConnectRetriesInterval(Duration connectRetriesInterval) { |
|
|
|
|
this.connectRetriesInterval = connectRetriesInterval; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Integer getLockRetryCount() { |
|
|
|
|
return this.lockRetryCount; |
|
|
|
|
} |
|
|
|
|
@ -868,4 +896,20 @@ public class FlywayProperties {
@@ -868,4 +896,20 @@ public class FlywayProperties {
|
|
|
|
|
this.stateScriptPrefix = stateScriptPrefix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getScriptPlaceholderPrefix() { |
|
|
|
|
return this.scriptPlaceholderPrefix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setScriptPlaceholderPrefix(String scriptPlaceholderPrefix) { |
|
|
|
|
this.scriptPlaceholderPrefix = scriptPlaceholderPrefix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getScriptPlaceholderSuffix() { |
|
|
|
|
return this.scriptPlaceholderSuffix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setScriptPlaceholderSuffix(String scriptPlaceholderSuffix) { |
|
|
|
|
this.scriptPlaceholderSuffix = scriptPlaceholderSuffix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|