Random order of UniqueConstraint and ForeignKey drop statements

Description

When using dropFirst=true I see that the order of the generated changes comes in a random order regarding UniqueConstraint and ForeignKey changes. The times when the UniqueConstraints is executed first the drop operation fails. After hours of debuggning I found that if I modified the method runBeforeTypes() in
liquibase.diff.output.changelog.core.UnexpectedForeignKeyChangeGenerator like this:

the ForeignKey changes will always get dropped before UniqueConstraint changes.
I've tried this in 3.0.x branch because I needed the fix in CORE-1423.

Environment

Windows 7, Derby

Reporter

Henrik Karlsson

Fix versions

Affects versions

Priority

Blocker
Configure