- 15 Feb 2016
Flyway needs a Datasource or a folder for the import script files.
The import script files build like this:
- prefix normally V
- version underscores separate the versions, you can do like this 1_2_3_4_5_6_7 or 184.108.40.206.5.6.7
- separator two underscores!
- description underscores separate the words, this description ist stored in the table schema_version
Commands for Java:
- clean() remove the whole database
- setBaselineVersionAsString(String Number) Set the version number for the init-import
- migrate() migrate the database to the baseline Version, when the baseline is empty he will upgrade the lastest version, that means the tool looks for the script files and trys to import this files by increasing the order of versions.
If Flyway say you have to set the Baseline, be sure that the database are empty. Sometimes e.g. the packages are invalid, they cannot be dropped. So the baseline "error" can fixed by checking and dropping the packages.
By PL/SQL scripts don't forget the "/" under the END; e.g.