Flyway 2.0: Out Of Order migrations, zero required dependencies, info and repair calls
Join the DZone community and get the full member experience.Join For Free
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.
Opinions expressed by DZone contributors are their own.