}
ArrayList<Index> indexesToDrop = New.arrayList();
ArrayList<Index> indexes = getIndexes();
if (indexes != null) {
for (int i = 0, size = indexes.size(); i < size; i++) {
Index index = indexes.get(i);
if (index.getCreateSQL() == null) {
continue;
}
if (index.getColumnIndex(col) < 0) {
continue;
}
if (index.getColumns().length == 1) {
indexesToDrop.add(index);
} else {
throw DbException.get(ErrorCode.COLUMN_IS_REFERENCED_1, index.getSQL());
}
}
}
for (Constraint c : constraintsToDrop) {
session.getDatabase().removeSchemaObject(session, c);