Over a million developers have joined DZone.

Flyway 2.0: Out Of Order migrations, zero required dependencies, info and repair calls

·

Flyway 2.0 has seen the light of day!

The highlights of this release are:

  • Support for “out of order” migrations
  • Zero required dependencies
  • New info and repair calls


Support for “out of order” migrations

By enabling the new flyway.outOfOrder property you can now fill gaps in your migration sequence. This is particularly helpful for dealing with branches and hotfixes. If a hotfix branch contains a migration, but the mainline has already evolved the schema further, it is now still possible to apply it. Previously it would have been ignored.


Zero required dependencies

Flyway has now gotten rid of its last required dependency: commons-logging. All you need to get started now are your JDK and the JDBC driver of your database. If you do prefer to keep using commons-logging, that’s fine too. Flyway will detect it at runtime and make use of it as before, so you don’t have to change anything.

The benefits, however, are not just for the API users. Ant and Command-line users now also enjoy a further reduction in size of their non-Spring distributions:


New info and repair calls

The info call is the successor of the now deprecated status and history calls. In addition to the information about migrations applied to the database, it now also informs you about pending migrations, so you get an exact idea of what will happen the next time you invoke migrate.

Repair on the other hand serves users who don’t get to enjoy a database with DDL transactions. In that case, if a migration fails, there is manual cleanup work involved. While you still have to take care of your own objects, repair will now at least fix the metadata table for you.



This, of course, is only the tip of the iceberg. This release packs a lot of improvements across the board, from bug fixes to better compatibility and performance improvements. All of this has only been possible thanks to the combined effort of all the users who reported issues and contributed fixes. Thank you!


One more thing…


The old Google Code wiki isn’t really cutting it anymore. We felt it was time for both a new home and a new design. So go ahead and check out Flyway 2.0 on its brand new website: http://flywaydb.org!

This release should be a drop in replacement for almost all existing users, but there are some minor incompatible but necessary changes, so make sure to check out the release notes as well.

Enjoy!

Axel

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}