Merge pull request #10807 from Eddu Melendez
* gh-10807: Align default of flyway.check-location with equivalent Liquibase prop
This commit is contained in:
@@ -31,6 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* properties into the {@link Flyway} instance.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Eddú Meléndez
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.flyway", ignoreUnknownFields = true)
|
||||
@@ -46,7 +47,7 @@ public class FlywayProperties {
|
||||
/**
|
||||
* Check that migration scripts location exists.
|
||||
*/
|
||||
private boolean checkLocation = false;
|
||||
private boolean checkLocation = true;
|
||||
|
||||
/**
|
||||
* Enable flyway.
|
||||
|
||||
@@ -173,8 +173,7 @@ public class FlywayAutoConfigurationTests {
|
||||
public void checkLocationsAllMissing() {
|
||||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
|
||||
.withPropertyValues(
|
||||
"spring.flyway.locations:classpath:db/missing1,classpath:db/migration2",
|
||||
"spring.flyway.check-location:true")
|
||||
"spring.flyway.locations:classpath:db/missing1,classpath:db/migration2")
|
||||
.run((context) -> {
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context).getFailure()
|
||||
@@ -188,8 +187,7 @@ public class FlywayAutoConfigurationTests {
|
||||
public void checkLocationsAllExist() {
|
||||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
|
||||
.withPropertyValues(
|
||||
"spring.flyway.locations:classpath:db/changelog,classpath:db/migration",
|
||||
"spring.flyway.check-location:true")
|
||||
"spring.flyway.locations:classpath:db/changelog,classpath:db/migration")
|
||||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.flyway.baseline-description= #
|
||||
spring.flyway.baseline-on-migrate= #
|
||||
spring.flyway.baseline-version=1 # version to start migration
|
||||
spring.flyway.check-location=false # Check that migration scripts location exists.
|
||||
spring.flyway.check-location=true # Check that migration scripts location exists.
|
||||
spring.flyway.clean-disabled= #
|
||||
spring.flyway.clean-on-validation-error= #
|
||||
spring.flyway.enabled=true # Enable flyway.
|
||||
|
||||
Reference in New Issue
Block a user