private static void checkForeignKeyAlterColumns(List<TableChange> columnChanges, Collection<Column> columns, ForeignKey foreignKey, Table table) {
for (Column column : columns) {
for (TableChange change : columnChanges) {
if (column.getName().equals(change.getOldName())) {
throw new ForeignKeyPreventsAlterColumnException(column.getName(), table.getName(), foreignKey.getConstraintName().getTableName());
}
}
}
}