Skip to content

GH-1962 - Fix Flyway migration discovery for dotted module identifiers. - #1963

Open
zemiles wants to merge 1 commit into
spring-projects:mainfrom
zemiles:fix/1962-nested-module-flyway-migrations
Open

zemiles wants to merge 1 commit into
spring-projects:mainfrom
zemiles:fix/1962-nested-module-flyway-migrations

Conversation

@zemiles

@zemiles zemiles commented Oct 14, 2026 •

Copy link
Copy Markdown

Fixes #1962.

HasMigrationFiles filters application modules before their Flyway locations are constructed. For a dotted identifier such as fully.qualified, it currently searches db/migration/fully.qualified, although the existing location customizer converts the identifier to db/migration/fully/qualified. The module can therefore be discarded before that correctly constructed location is used.

Apply the same dot-to-slash conversion in the migration-file check. This keeps discovery consistent with the existing location construction and limits the change to the filter.

The regression test places a migration resource under db/migration/fully/qualified and expects both the root and module configurations, with the module location set to classpath:db/migration/fully/qualified. Before the fix, the module is filtered out and only the root configuration remains. This test checks resource discovery and location configuration; it does not execute SQL migrations.

Validation on Windows with Oracle JDK 17.0.12:

  • All 28 Runtime tests passed, including all 7 Flyway customizer tests.
  • Full clean verify with -fae and build caching disabled failed in 6 existing JDBC findsPublicationsOlderThanReference assertions for Oracle and SQL Server (expected 1 result, got 2). Maven skipped 8 dependent modules. Those failures were not compared against an unchanged base branch.

…dule identifiers.

Signed-off-by: 안승현 <abeb3@naver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module-aware Flyway silently skips migrations of nested application modules

1 participant