{
HashSet processedColumns = new HashSet();
for (Iterator changeIt = columnChanges.iterator(); changeIt.hasNext();)
{
ColumnChange change = (ColumnChange)changeIt.next();
Column sourceColumn = change.getChangedColumn();
Column targetColumn = targetTable.findColumn(sourceColumn.getName(), getPlatform().isDelimitedIdentifierModeOn());
if (!processedColumns.contains(targetColumn))
{
processColumnChange(sourceTable,
targetTable,
sourceColumn,
targetColumn,
(change instanceof ColumnDataTypeChange) || (change instanceof ColumnSizeChange));
processedColumns.add(targetColumn);
}
changes.remove(change);
change.apply(currentModel, getPlatform().isDelimitedIdentifierModeOn());
}
}
// Finally we add primary keys
for (Iterator changeIt = changes.iterator(); changeIt.hasNext();)
{