Flyway will not scan classpath locations if they contains a dot in directory name
See original GitHub issueOur directory structure for static SQL migration files contains a dot (‘.’) in the directory name. If these files a all part of a resource Jar and we will now configure Flyway with location starting direct with this directory it will not find any migration file.
Example Directory structure: archive-2.6 … archive-3.3
...locations=classpath:archive-3.3, classpath:/org/archive/migrations
Following workaround works:
- replace ‘.’ with ‘_’ 😃
- add a parent directory ‘sql’ and configure
locations=classpath:sql, classpath:...
, but now we scan some directories we won’t have in the scan.
I take a look into the implementation of Location and see path.replace(".", "/");
.
First I think may a quot for dot support will help.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Locations - Flyway by Redgate • Database Migrations Made ...
Locations. Description. Comma-separated list of locations to scan recursively for migrations. The location type is determined by its prefix.
Read more >Flyway can't find classpath:db/migrations - Stack Overflow
Go to the resource folder -> Create DB folder -> Create migration folder -> Create database file with Version_SubVersion__Name(As defined below) ...
Read more >Introduction of Flyway with Spring Boot | by Guster - Medium
You can think of Flyway as version control for your database. ... Inside the migration file contains the pure SQL statements. For example:...
Read more >Flyway - Database migrations made easy | Novatec
If you have an existing database that has not been filled by Flyway, ... it's important to customize the name of the migration...
Read more >Flyway Integration With Spring - Humble Bits - Quovantis
If this table is not found then it will create this database. After the creation of the database, Flyway scans the classpath for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I stumbled across the same issue today. Would be good to have it fixed. Scanning for folders without the replacements and with the replacements of
.
sounds good.This feature is now available in the V7 beta which you can read more about here.