public void createSchema() throws IOException {
if(!schemaExists()) {
log.info("creating schema: " + sqlTable.getAbsoluteName());
CreateTableQuery query = new CreateTableQuery(sqlTable, true);
setColumnConstraintForQuery(query, primaryColumn);
for(Column column : mapping.getFields().values()) {
setColumnConstraintForQuery(query, column);
}
PreparedStatement statement = null;
try {
statement = connection.prepareStatement(query.validate().toString());
statement.executeUpdate();
} catch (SQLException ex) {
throw new IOException(ex);
} finally {
SqlUtils.close(statement);