liquibase Diff command Using difftypes=data is not working.

c:\LiquiBase>liquibase --username=root --url=jdbc:mysql://localhost:3306/schema3 --driver=com.mysql.jdbc.Driver --referenceUrl=jdbc:mysql://localhost:3306/solut ion --referenceUsername=root --diffTypes=data diff diffChangeLog >change.xml

I have created two databases in mysql, out of two one contains tables with data and another contains only empty tables. I expect from above command it should given the difference of data and generate the changelog.But it is not giving data diff it is just giving the structure difference.

Thanks for posting that!

I just created a pull request that will let users know that diffTypes=data in diffChangeLog does not work.

https://github.com/liquibase/liquibase/pull/417

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

–diffTypes=data can onyl be used with the generateChanegLog command

Controlling Checks (since 1.8)

What changes are checked for can be controlled with the diffTypes parameter to the diff commands. The following options are available and can be passed as a comma-separated list:

  • tables [DEFAULT]
  • columns [DEFAULT]
  • views [DEFAULT]
  • primaryKeys [DEFAULT]
  • indexes [DEFAULT]
  • foreignKeys [DEFAULT]
  • sequences [DEFAULT]
  • data

If no diffTypes are specified, the checks marked DEFAULT will be run.

Note: This only works with the “generateChangeLog” command, not the “diff” or “diffChangeLog” commands.

Thanks Steve!

I guess what is confusing is that the 1st line of that section states “What changes are checked for can be controlled with the diffTypes parameter to the diff commands” but the line just before the note states “This only works with the “generateChangeLog” command, not the “diff” or “diffChangeLog” commands” which seems to contradict what was said in the 1st line.

Would you be able to correct the documentation on the page http://www.liquibase.org/documentation/diff.html and provide a few examples?