Schema Comparison Logic

Description

In liquibase.diff.compare.core.SchemaComparator we find

if (accordingTo.supportsCatalogs()) { if (thisSchema.getCatalogName() == null) { return otherSchema.getCatalogName() == null || accordingTo.getDefaultCatalogName() == null || accordingTo.getDefaultCatalogName().equalsIgnoreCase(otherSchema.getCatalogName());

which may short-circuit (does not compare the schema anymore) the comparison. I'm not really sure whether a null DefaultCatalogName is acceptable at all, but in this case this seems to consider far too many schemata equal.
Also I'm a bit confused that the comparsion is always made using the schema/catalog settings of the comparsion database which may be wrong if we are diffing two databases with different settings. Diffing derby against hibernate this seems causes the default schema/catalogs to mismatch.

Environment

-

Activity

Show:

Details

Reporter

Affects versions

Priority

Created February 18, 2014 at 12:23 PM
Updated February 18, 2014 at 12:23 PM

Flag notifications