Flyway: running multiple migrations in a single transaction
<p>I've been looking at <code>Flyway</code> as a database migration tool.</p>

<p>The one thing that I have been unable to find a definite answer for is the following:</p>

<p>Can I force Flyway to run all as-of-yet unapplied migrations in a single transaction, instead of having each migration be its own transaction?</p>

<p>In a dev environment it's not an issue, but in a production environment where you would potentially perform multiple migrations from one update to the next, one of the migrations failing would leave the database in a 'half-migrated' state, where some migrations were committed and some not - quite a bad thing.</p>

<p>A workaround would be to simply cram all the SQL required in a single file, but there are issues with that:</p>

<ul>
<li><p>The production migrations and dev migrations would end up being performed differently, since you cannot know in advance what will be in the migration on dev environment. I guess you could always do a clean and then a new migrate, but this seems to be against the spirit of the flyway design with regard to incremental migrations.</p></li>
<li><p>The checksums will be different as soon as a new change is added.</p></li>
</ul>

<p>Does Flyway still not support such a feature? Does Liquibase, or any other migration tool?</p>