String tableName = Utilities.getColumn(type).getTableName();
String tableName = type.getColumn().getTableName();
    public Collection generateTable(ObjectType type,                                    Column keyColumn,                                    Collection properties,                                    Map defaultValueMap) {        StringBuffer ddl = new StringBuffer();        ArrayList statements = new ArrayList();        String tableName = Utilities.getColumn(type).getTableName();        boolean tableExists = tableExists(tableName);        if (!tableExists) {            // create table            return super.generateTable(type, keyColumn,                                       properties, defaultValueMap);        } else {            // alter table            ArrayList list = new ArrayList();            if (properties == null) {                return list;            }            Iterator props = properties.iterator();            while (props.hasNext()) {                Property property = (Property)props.next();                // collections are handled by mapping tables later                if (!property.isCollection()) {                    Object defaultValue = null;                    Column propCol;                    if (property.isAttribute()) {                        propCol = property.getColumn();                    } else {                        propCol = ((JoinElement)property.getJoinPath()                                   .getPath().get(0)).getFrom();                    }                    String columnType =                        getJDBCTypeString(property, propCol);                    String columnName =                        alterStringForSQL(propCol.getColumnName());                    StringBuffer sb = new StringBuffer();                    list.add("alter table " + tableName + " add " +                             columnName + " " + columnType);                    if (defaultValueMap != null) {                        Object value = defaultValueMap.get(property.getName());                        if (value != null) {                            list.add("alter table " + tableName + " alter " +                                     columnName + " set " +                                     getDefaultString(value));                        }                    }                    if (property.getMultiplicity() == Property.REQUIRED) {                        String constraintName =                            getConstraintName(tableName, columnName, "nn");                        list.add("alter table " + tableName + " add " +                                 "constraint " + constraintName + " " +                                 "check (" + columnName + " notnull)");                    }                }            }            if (list.size() == 0) {                return null;            }            return list;        }    }