Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* properties into the {@link Flyway} instance.
*
* @author Dave Syer
* @author Eddú Meléndez
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.flyway", ignoreUnknownFields = true)
Expand All @@ -46,7 +47,7 @@ public class FlywayProperties {
/**
* Check that migration scripts location exists.
*/
private boolean checkLocation = false;
private boolean checkLocation = true;

/**
* Enable flyway.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public void changeLogDoesNotExist() {
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()
Expand All @@ -188,8 +187,7 @@ public void checkLocationsAllMissing() {
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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,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.
Expand Down