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.
By default both versioned and repeatable migrations can be written either in SQL or in Java and can consist of multiple statements. Flyway automatically discovers migrations on the filesystem and on the Java classpath.
Flyway is an open-source database migration tool. It strongly favors simplicity and convention over configuration. It is based around just 7 basic commands: Migrate, Clean, Info, Validate, Undo, Baseline and Repair.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With