HHH-8092 Added comment about unique constraints in schema update.

This commit is contained in:
Brett Meyer 2013-04-05 12:15:48 -04:00
parent d35dee771b
commit 838e71a0ee
1 changed files with 3 additions and 1 deletions

View File

@ -1183,7 +1183,9 @@ public class Configuration implements Serializable {
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 ) {