diff --git a/src/main/java/com/craftmend/storm/Storm.java b/src/main/java/com/craftmend/storm/Storm.java index 299bf95..75e4fa9 100644 --- a/src/main/java/com/craftmend/storm/Storm.java +++ b/src/main/java/com/craftmend/storm/Storm.java @@ -85,6 +85,7 @@ public void runMigrations() throws SQLException { if (!tables.next()) { // table doesn't exist.. creating logger.info("Creating table " + parsed.getTableName() + "..."); + logger.warning("Statement: " + model.statements().buildSqlTableCreateStatement(driver.getDialect(), this)); driver.execute(model.statements().buildSqlTableCreateStatement(driver.getDialect(), this)); } } diff --git a/src/main/java/com/craftmend/storm/parser/types/objects/adapters/BooleanAdapter.java b/src/main/java/com/craftmend/storm/parser/types/objects/adapters/BooleanAdapter.java index 8d3712b..f624c2d 100644 --- a/src/main/java/com/craftmend/storm/parser/types/objects/adapters/BooleanAdapter.java +++ b/src/main/java/com/craftmend/storm/parser/types/objects/adapters/BooleanAdapter.java @@ -17,12 +17,12 @@ public Boolean fromSql(ParsedField parsedField, Object sqlValue) { @Override public Object toSql(Storm storm, Boolean value) { - return value; + return value ? 1 : 0; } @Override public String getSqlBaseType() { - return "BOOLEAN"; + return "INTEGER"; } @Override