пятница, 9 декабря 2016 г.

Сравнение Flyway и Liquibase

http://stackoverflow.com/a/37411404/1499445

I already used both tools and so, in view, these are the main differences.
Flyway
  1. Easy to configure - you just need a folder location and keep a name syntax V1__file.sql,...
  2. SQL-based, but you need to write the right syntax of your specific database engine (Mysql, DB2,...)
  3. Is Java based so adding custom configuration to clean, execute etc. is easier.
Liquibase
  1. Need a main file "changelog" to keep track of all executed changesets.
  2. Is XML based, so you need to use specific liquibase tags to create SQL code. This is perfect to migrate your code to a different DB engine: you won't need to change anything, and just the DB driver will tell liquibase how to translate from XML tags to the right SQL syntax.
  3. If you use the sql tag from liquibase, then you won't take advantage of point 2, so it would be better to use Flyway instead.
  4. Liquibase provides a jar to migrate an existing DB to all needed XML files automatically, so you don't need to work manually on them. Quite useful.
Now it is up to you to decide what you need for your project, whether you need to migrate to a different DB engine in the future etc.

Комментариев нет:

Отправить комментарий