Flyway configuration
Published 15 December 2021
Flyway Desktop uses the flyway command line under the hood to migrate database schema definitions.
Updating the shadow database is done using flyway migrate and rebuilding the shadow database is done using flyway clean followed by flyway migrate.
The behavior of this command line can be configured using the flyway.conf file which is in the root level of your project folder. For the full list of available configuration parameters see here.
When a new project is created, some additional configuration is set by default.
The following defaults are set for all projects:
Configuration | What it does |
---|---|
flyway.mixed=true | This is needed to handle the migration of the shadow database when your schema contains some objects, and hence some migrations, which cannot be wrapped in a transaction. |
flyway.outOfOrder=true | This makes it possible to run migrations created out of order. This is useful, for example, if two developers create non-conflicting migrations at the same time and want to migrate their local development databases after pulling down each others changes from version control. |
flyway.locations=filesystem:migrations | This sets the default location of the migrations folder. |
SQL Server default configuration
The following defaults are set for SQL Server projects only:
Configuration | What it does |
---|---|
flyway.plugins.clean.mode=all | This specifies that flyway clean should drop all objects in a database across all schemas. It is recommended to always set this option for SQL Server. |
flyway.createSchemas=false | This specifies that non-existent schemas should not be created when flyway migrate is run. Flyway Desktop expects the schema creation logic to exist within the migrations themselves. |
Oracle default configuration
The following defaults are set for Oracle projects only:
Configuration | What it does |
---|---|
flyway.oracle.sqlplus=true | Enable Flyway’s support for Oracle SQL*Plus commands. |