2

Is there a good or recommended tool that manages both DDLs and DMLs migrations?

Majority of my App configuration is stored in a database, I want to be able to freely develop and migrate this and not only the DDLs. Any suggestions on this?

JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57

3 Answers3

3

Both Flyway and Liquibase can deal with DML.

Speaking from the Flyway perspective, Flyway has been built from the ground up with both DDL and DML (configuration, reference data, ...) in mind. The whole range of DML commands can be used as migrations are written as plain SQL files.

For a more detailed comparison of both frameworks have a look at this question and the comparison matrix on the Flyway homepage.

Community
  • 1
  • 1
Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
1

Liquibase handles DML as well as DDL. http://liquibase.org/manual/refactoring_commands lists available tags, including insertData, loadData, deleteData, etc.

Nathan Voxland
  • 15,453
  • 2
  • 48
  • 64
  • Thanks. Last I tried to look at Liquibase, it had no way to exclude tables from the DML extracts or filter out the SELECT query. This caused the application to faile with OutOfMemory Exception. Is that changed by now? – JAR.JAR.beans Jan 12 '12 at 10:30
  • I assume you are talking about when you are doing a database diff/generateChangeLog? You are not currently able to exclude tables or portions of data if you are requesting an output of data. You can specify which table(s) to include, but not "all but X". The diff/generateChangeLog support in liquibase is not a normal part of the data migration process, so don't just go by the initial setup as a reason to use or not to use liquibase. – Nathan Voxland Jan 12 '12 at 15:24
  • You can use groovy to dump large amounts of data as a liquibase changeset. See answer to this question: http://stackoverflow.com/questions/8397488/comparing-databases-and-genrating-sql-script-using-liquibase/8408334#8408334 – Mark O'Connor Jan 12 '12 at 19:30
  • I could not find any pace where I can list tables to include or exclude using Liquibase. I did find this patch however: http://liquibase.jira.com/browse/CORE-875 Is that planned for the core? – JAR.JAR.beans Jan 18 '12 at 12:55
  • Yes, it will get in for the next release – Nathan Voxland Jan 18 '12 at 20:26
0

Checking various tools, the solution for us was to refine DBUnit to support migration scripts. The XML structure as the output allows for a very good Source Control and cross vendor solution (we work with both DB2 and Oracle).

JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57