else {
throw new NoSuchIndexException(indexName);
}
// no primary key nor connected to a FK
if(index.isPrimaryKey() || index.isConnectedToFK()) {
throw new ProtectedIndexException(indexName, table.getName());
}
if (allIndexes != tableIndexes) {
allIndexes.add(index);
}
}