flyway/flyway — pull request #781 by jyore (2014-06-19 20:21:10+00:00)
Title: Support for migrating multiple schemas at once

Current codebase did not support migrating multiple db's in a single maven command. The use case for this is multi-tenant systems that have data isolation based on the database schema. Running maven once per tenant is not feasible.

The implementation provided may need some work, but I wanted to keep the current implementation in-tact and allow for the option to run migrations over the entire flyway.schemas list.

To accomplish this, I added a property (flyway.multipleDbMode), defaulted to false. When true, this will migrate every schema in the list provided to flyway.schemas. When false, this will migrate just the first of the list, as was in place in the current codebase. Both the gradle and maven plugins have been updated to set the property appropriately as well.