I use Flyway to handle database migration. Everything works fine: default location of migration files:
main/resource/db/migration/V1...
I run integration tests, and my installation uses a separate database schema for integration, which I would also like to deal with span. Integration tests, however, are in the test(not main) folder . When the Flyway bean runs migrate(), it does not find the migration files because they are in the folder main. If I put the migration files in test/resource/db/migration/V1..., it will work.
I really don't need to copy this file to the resources folder test, so I don't need to support both. Is there a way to get Flyway to use the same migration files for the integration test as for a regular application?
source
share