Flyway db migration folder

2019-06-17 08:11发布

问题:

I have a question about flyway migration folder . Does sql's have to reside in project folder Application/foo/bar/main/resources/db/migration. Could it reside outside of the application cource folder?

We are using Maven.

回答1:

By default Flyway will look for migrations on the classpath under db/migration, which on a Maven project means src/main/resources/db/migration.

You can however also use a location starting with the filesystem: prefix that can be anywhere on your disk.

See the ”Location and discovery“ section of the SQL-based migrations documentation page.

For command-line use, see the locations option on the migrate command reference page.



标签: flyway