Skip to content

Commit 5726301

Browse files
committed
Fix Table::emptyInsertStmt for NOT NULL fields with default value
See issue sqlitebrowser#97.
1 parent 9682d34 commit 5726301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sqlitetypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ QString Table::emptyInsertStmt(int pk_value) const
181181
vals << QString::number(pk_value);
182182
else
183183
vals << "NULL";
184-
} else if(f->notnull()) {
184+
} else if(f->notnull() && f->defaultValue().length() == 0) {
185185
fields << f->name();
186186

187187
if(f->isInteger())

0 commit comments

Comments
 (0)