addForeignKeyConstraint dropped and recreated identically in diff'ed changelog

ChangeLog #1 - Liquibase-generated initial changelog based on schema from products last release:

        ...                     ...
ChangeLog #2 - Liquibase-generated delta changelog of the schema from the products last release diff'ed against the current schema:
        ...                                     ...

The diff generated changelog seems to drop an existing addForeignKeyConstraint and then recreate the exact same addForeignKeyConstraint.

I’m using Firebird 2.1/Jaybird 2.1.1 and Liquibase 1.9.4 & this is a database for Quartz (it’s the same version of Quartz in both cases do the schema shouldn’t be different).

Any ideas?


Adding a bit more info…

Actually, I misspoke a bit earlier…the initial changelog was generated from version 1; the diff’ed changelog was created comparing the schema from version 1 to that of version 2.  We are now working on version 3.  I created another diff’ed changelog and got some more unexpected results.  This version drops the same addForeignKeyConstraintS that were dropped before; however, this time, there is no entry to re-create them.

Anyone else encountering unexpected behavior like this?  Is this just “how it works” and all generated changelogs need to be combed through?


It is pretty much “how it works”.  At least currently.  We are trying to improve the diff support, and any help anyone can offer on it would be great. The JDBC drivers aren’t always the best at returning FK information in a nice manner, and some databases intermix indexes with foreign keys and it can be difficult to sort them out.  Plus there are issues about what makes two FKs the same?  We can’t go by name because some databases will automatically generate names, so we try to be smarter.  Sometimes it’s not smart enough though.

I believe there is an issue in jira similar to this somewhere, and I have worked to improve it a bit in the upcoming 2.0.