private void addMissingColumns() { try (Statement stmt = connection.createStatement()) { for (Column column : getMissingColumns(false)) { String alter = table.getAddColumnSql(column); if (logger.isLogEnabled()) { logger.log(alter); } stmt.execute(alter); } } catch (SQLException e) { throw new DirectoryException(String.format("Table '%s' alteration failed: %s", table, e.getMessage()), e); } }
if (type == null) { log.warn("Adding missing column in database: " + column.getFullQuotedName()); ddlCollector.add(table.getAddColumnSql(column)); ddlCollector.addAll(table.getPostAddSqls(column, model)); addedColumns.add(column);