I'm using Flyway to handle the database migration. Everything is working fine: the default location of the migration files is:
main/resource/db/migration/V1...
I am running integration tests and my setup uses an separate database schema for integration, which I would like to manage with flyway as well.
The integration tests, though, are located in the test
folder (not main
). When the Flyway bean executes migrate()
, it doesn't find the migration files because they are in the main
folder. If I put the migration files in test/resource/db/migration/V1...
it works.
I really don't want to have to copy these file into the test
resource folder, so I don't have to maintain both. Is there a way to force Flyway to use the same migration files for the integration test as for the normal app?