{
TableChange change = (TableChange)changeIt.next();
if (change instanceof AddColumnChange)
{
AddColumnChange addColumnChange = (AddColumnChange)change;
// We can only use PostgreSQL-specific SQL if
// * the column is not set to NOT NULL (the constraint would be applied immediately
// which will not work if there is already data in the table)
// * the column has no default value (it would be applied after the change which
// means that PostgreSQL would behave differently from other databases where the
// default is applied to every column)
// * the column is added at the end of the table (PostgreSQL does not support
// insertion of a column)
if (!addColumnChange.getNewColumn().isRequired() &&
(addColumnChange.getNewColumn().getDefaultValue() == null) &&
(addColumnChange.getNextColumn() == null))
{
processChange(currentModel, desiredModel, addColumnChange);
changeIt.remove();
}
}