Skip to content

Commit

Permalink
Deprecate support for checking Flyway locations
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Mar 9, 2021
1 parent ed72bca commit 4d97ed1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ else if (flywayDataSource != null) {
return configuration.getDataSource();
}

@SuppressWarnings("deprecation")
private void checkLocationExists(DataSource dataSource, FlywayProperties properties,
ResourceLoader resourceLoader) {
if (properties.isCheckLocation()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
* @author Anand Shastri
* @author Stephane Nicoll
* @since 2.2.0
* @deprecated since 2.5.0 as location checking is deprecated
*/
@Deprecated
public class FlywayMigrationScriptMissingException extends RuntimeException {

private final List<String> locations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;

/**
* Configuration properties for Flyway database migrations.
Expand All @@ -45,8 +46,10 @@ public class FlywayProperties {
private boolean enabled = true;

/**
* Whether to check that migration scripts location exists.
* Whether to check that migration scripts location exists. Should be set to false
* when using a wildcard location or a remote-hosted location such as S3 or GCS.
*/
@Deprecated
private boolean checkLocation = true;

/**
Expand Down Expand Up @@ -365,10 +368,14 @@ public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

@Deprecated
@DeprecatedConfigurationProperty(
reason = "Locations can no longer be checked accurately due to changes in Flyway's location support.")
public boolean isCheckLocation() {
return this.checkLocation;
}

@Deprecated
public void setCheckLocation(boolean checkLocation) {
this.checkLocation = checkLocation;
}
Expand Down

0 comments on commit 4d97ed1

Please sign in to comment.