Skip to content

Commit

Permalink
HHH-8092 Added comment about unique constraints in schema update.
Browse files Browse the repository at this point in the history
  • Loading branch information
brmeyer committed Apr 5, 2013
1 parent d35dee7 commit 838e71a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -1183,7 +1183,9 @@ public String[] generateSchemaUpdateScript(Dialect dialect, DatabaseMetadata dat
Iterator uniqueIter = table.getUniqueKeyIterator();
while ( uniqueIter.hasNext() ) {
final UniqueKey uniqueKey = (UniqueKey) uniqueIter.next();
// Skip if index already exists
// Skip if index already exists. Most of the time, this
// won't work since most Dialects use Constraints. However,
// keep it for the few that do use Indexes.
if ( tableInfo != null && StringHelper.isNotEmpty( uniqueKey.getName() ) ) {
final IndexMetadata meta = tableInfo.getIndexMetadata( uniqueKey.getName() );
if ( meta != null ) {
Expand Down

0 comments on commit 838e71a

Please sign in to comment.