diff --git a/src/main/java/liquibase/ext/hibernate/snapshot/UniqueConstraintSnapshotGenerator.java b/src/main/java/liquibase/ext/hibernate/snapshot/UniqueConstraintSnapshotGenerator.java index f6187099..7a89e42f 100644 --- a/src/main/java/liquibase/ext/hibernate/snapshot/UniqueConstraintSnapshotGenerator.java +++ b/src/main/java/liquibase/ext/hibernate/snapshot/UniqueConstraintSnapshotGenerator.java @@ -45,6 +45,7 @@ protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) thro UniqueConstraint uniqueConstraint = new UniqueConstraint(); uniqueConstraint.setName(hibernateUnique.getName()); uniqueConstraint.setTable(table); + uniqueConstraint.setClustered(false); // No way to set true via Hibernate Iterator columnIterator = hibernateUnique.getColumnIterator(); int i = 0; while (columnIterator.hasNext()) { @@ -65,6 +66,7 @@ protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) thro if (column.isUnique()) { UniqueConstraint uniqueConstraint = new UniqueConstraint(); uniqueConstraint.setTable(table); + uniqueConstraint.setClustered(false); // No way to set true via Hibernate String name = "UC_" + table.getName().toUpperCase() + column.getName().toUpperCase() + "_COL"; if (name.length() > 64) { name = name.substring(0, 63);