Fix Table::emptyInsertStmt for NOT NULL fields with default value

See issue #97.
This commit is contained in:
Martin Kleusberg
2014-09-04 20:50:15 +02:00
parent 9682d34ca7
commit 572630197c

View File

@@ -181,7 +181,7 @@ QString Table::emptyInsertStmt(int pk_value) const
vals << QString::number(pk_value);
else
vals << "NULL";
} else if(f->notnull()) {
} else if(f->notnull() && f->defaultValue().length() == 0) {
fields << f->name();
if(f->isInteger())