Hi,
I’m not sure where this would be happening. If I use Liquibase to apply an XML Changelog to an HSQL database, and that changelog creates tables with unique columns, when I use the DiffResult.printChangeLog() function to dump the HSQL database back out to a new XML Changelog, (among other differences) the unique and uniqueConstraintName attributes of the unique columns are missing.
i.e. The original changelog has this:
I’m pretty sure the unique attribute is making it into the HSQL database, because when I Diff the HSQL database against a DB2 or MySQL database that has the same tables in it, it finds no differences, and when I remove the unique constraint in one of the databases, it finds that the unique constraint was removed; so it must be happening somewhere in DiffResult.printChangeLog() when it converts the database back into a changelog.
Any ideas on where I should look to fix this?
This also happens if I load the changelog into DB2 and then export it back to an XML changelog, so it’s not an HSQL specific thing. I think I remember you (Nathan) saying that there were problems distinguishing between Unique constraints & Indexes? I noticed that the exported changelog also has an extra for the “INTEGER_UNIQ” column that wasn’t in the original changelog.
This is preventing us from being able to create foreign keys, since the column they reference need to be unique.