Skip to content

Deprecate support for checking Flyway locations #25488

@MateuszSobala

Description

@MateuszSobala

Spring Boot version 2.4.3 (could be any which supports Flyway 6.4)

With version 6.4 flyway introduced support for wildcards in scripts locations, see https://flywaydb.org/blog/organising-your-migrations. Unfortunately the Spring location checker is not consistent with the new flyway feature.

When defining locations with wildcards, eg. spring.flyway.locations=classpath:/db/release-?.?/migration/, spring.flyway.locations=classpath:/db/release-*/migration/, Spring checks whether this location exists. In this case it certainly doesn't.

As a workaround I can set spring.flyway.check-location=false but it took me some time to discover that the issue is indeed in Spring's additional path validation. Furthermore I'd like to check the location even when using wildcards.

Sample project: https://github.com/MateuszSobala/spring_flyway-location-wildcards
Code which needs to be adjusted:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions