I’m comparing a MySql 5.7 database (using Inno as you’d expect). The “dialect” is “MySQL5InnoDBDialect”.
My production application has 200 customer databases, and so I have to have some form of automated database management. I also have a swatch of historical differences between customer databases that no matter how much I beg I don’t have the budget to sit down and fix, so I have to use the Diff capability of liquibase to keep the databases inline as a number of the production databases have extra tables/indexes/etc 
If I include
typesToInclude.add(Index.class);
and
typesToInclude.add(UniqueConstraint.class);
in my diff, the generated changeset includes a valid “addUniqueConstraint” sections for the new “unique indexes” in my Entities.
If I don’t include the
typesToInclude.add(UniqueConstraint.class);
in my diff then the generated changeset includes an invalid “createIndex” section for the new “unique indexes” in my Entities, as described above: missing the “index name” property.
This behaviour appears constant for me no matter what versions of Liquibase (using 3.5.5, 3.10.2 and 4.1.0).
HOWEVER 4.1.0’s abherrent behaviour:
When I include both clauses:
typesToInclude.add(Index.class);
typesToInclude.add(UniqueConstraint.class);
in my diff for 4.1.0 it goes wild and includes “addUniqueConstraint” sections for ALL the “unique indexes” in my Entities, not just the new ones.
For some reason it seems to not be able to see that the constraint already exists 
But if I only include the
typesToInclude.add(Index.class);
in the diff, then it only adds “createIndex” sections for the “new” indexes. However, as noted above, when the indexes are “unique” it misses the name off.
So, with prior versions I would include both Types in my diff and I’d end up with a working script. But with 4.1 I can’t get a working script - I’m either missing the index name off or I’ve got loads of extra “addUniqueConstraints” that blow up when they run.
Is there something I’m doing wrong, as I can’t seem to get an “index name” on a generated “create index” change for a unique index no matter what versions I throw at it I’m sure this can’t work like this for Everyone can it?
Given this behaviour I can’t update our system to Liquibase 4+.