use of liquibase.structure.core.UniqueConstraint in project liquibase by liquibase.
the class UniqueConstraintComparator method hash.
@Override
public String[] hash(DatabaseObject databaseObject, Database accordingTo, DatabaseObjectComparatorChain chain) {
List<String> hashes = new ArrayList<String>();
if (databaseObject.getName() != null) {
hashes.add(databaseObject.getName().toLowerCase());
}
Table table = ((UniqueConstraint) databaseObject).getTable();
if (table != null) {
hashes.addAll(Arrays.asList(DatabaseObjectComparatorFactory.getInstance().hash(table, chain.getSchemaComparisons(), accordingTo)));
}
return hashes.toArray(new String[hashes.size()]);
}
Aggregations