//broken, 'cos we don't generate these with names in SchemaExport subIter = table.getIndexIterator(); while ( subIter.hasNext() ) { Index index = (Index) subIter.next(); if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) { if ( tableInfo==null || tableInfo.getIndexMetadata( index.getFilterName() ) == null ) { script.add( index.sqlCreateString(dialect, mapping) ); } } } //broken, 'cos we don't generate these with names in SchemaExport subIter = table.getUniqueKeyIterator(); while ( subIter.hasNext() ) { UniqueKey uk = (UniqueKey) subIter.next(); if ( tableInfo==null || tableInfo.getIndexMetadata( uk.getFilterName() ) == null ) { script.add( uk.sqlCreateString(dialect, mapping) ); } }