Allow customization of Flyway migration process.

Fixes gh-1814.