Iterator<ForeignKey> subIter = table.getForeignKeyIterator();
while (subIter.hasNext()) {
ForeignKey fk = (ForeignKey) subIter.next();
if (fk.isPhysicalConstraint()) {
// collect the drop foreign key constraint sql
dropForeignKeysSql.add(fk.sqlDropString(dialect, catalog, schema));
// MySQLDialect creates an index for each foreign key.
// see
// http://opensource.atlassian.com/projects/hibernate/browse/HHH-2155
// This index should be dropped or an error will be thrown during
// the creation phase