locations = arrayOf("classpath:db/migration") doesn't work
Author: pyiso80Created Dec 5, 2025Updated Aug 5, 2026
Labelss: waiting for feedback
flyway {
...
locations = arrayOf("classpath:db/migration")
baselineOnMigrate = true
}I suppose using classpath:db/migration, to indicate the location of migration scripts, should work fine. But it doesn't. I can only use filesystem like below.
flyway {
...
// locations = arrayOf("classpath:db/migration")
locations = arrayOf("filesystem:src/main/resources/db/migration")
baselineOnMigrate = true
}I couldn't find this issue reported in the issued history. I also made sure the folder is not db.migration, but is really src/main/resources/db/migration. Not a very serious issue since I can still use filesystem, but I thought I might as well report it. By the way, I am using the latest version 11.8.0. Here is the folder structure just for reference:
Source: flyway/flyway