Default Deploy Rules
It would be great if it was possible to set a project level default Deploy Rule for all new migrations. "Flyway Desktop" support would be ideal, but just having this option in the Flyway CLI would be great.
For all of our migrations, we like to use a Deploy Rule to prevent running migrations against our production environment until the changes have been reviewed and approved. Before we used a Deploy Rule, sometimes changes were accidentally applied to production before they were explicitly approved.
With our current workflow, we are creating the same custom deploy rule for every new migration. We create ~5-10 migrations per week across our ~40+ different flyway database projects. Being able to set a default Deploy Rule for all new migrations would be wonderful.
Example:
Add a new parameter to flyway.toml: defaultScriptConfiguration = "shouldExecute=${flyway:environment}!=production"
When new Migrations are generated, also generate the migration's .conf file with the contents set to the defaultScriptConfiguration parameter.
-
We see some teams do this with a branching strategy in their version control systems. You only release to Prod from a release branch, so you never merge your migration scripts into that branch until they are reviewed and ready to go to Prod.
Would something like this work?