You are here: Foswiki>Service Web>DatabaseMigration (16 Feb 2016, SebastianMueller)Edit Attach
-- SebastianMueller - 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
  • 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.

Known Problems:

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.


Topic revision: r2 - 16 Feb 2016, SebastianMueller
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback