Axel Fontaine is a software development expert and freelance consultant based in Munich. He is specialized in Continuous Delivery. He has extensive experience with the full software development lifecycle. He hates complexity with a passion. As an architect, developer, coach and consultant he helps his customers improve the way they develop and deliver software. To alleviate one of the traditional pain points, he started Flyway, the Agile Database Migration Framework for Java. He frequently speaks at Java User Groups. Axel is a DZone MVB and is not an employee of DZone and has posted 7 posts at DZone. You can read more from them at their website. View Full User Profile

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

11.14.2012
| 3265 views |
  • submit to reddit

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

0
Published at DZone with permission of Axel Fontaine, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)