Flyway

More control over where migration scripts are deployed

Sometimes, you may need to restrict where scripts get deployed to.  For example:

  • Test data should go to my test environment, but not production
  • Deploying to multiple clients where there is specific data for each client or maybe one client has a few extra schema objects due to a bespoke customization


Restrict script execution to specified environments

Manage environment restrictions via CLI

Placeholders can be used to specify target environments for where you want to deploy migration scripts via the CLI. See our Tutorial - Injecting Environments for a detailed example. For more info on setting placeholders, see the "How to configure" section of our Placeholders Configuration page.

Note: This functionality is limited to Flyway Teams and Enterprise users.

Manage environment restrictions via GUI

Flyway Desktop can be used to specify target environments for each migration script. See our Deploy Rules documentation for help configuring environment restrictions via Flyway Desktop.

Note: This functionality is limited to Flyway Teams and Enterprise users.

Manage environment restrictions via separate migration script directories

Migration scripts can be organized into multiple migration directories within a single project. These folders can then be applied to specified environments via your CI/CD system to run the appropriate migrations. View our documentation on Organizing your migrations to learn more.

Note: This functionality is available to all Flyway users, including Flyway Community.




Didn't find what you were looking for?