diff --git a/db.js b/db.js index 1ed58c7..c239e6c 100644 --- a/db.js +++ b/db.js @@ -54,7 +54,7 @@ const db = function ({host, port, user, password, database}) { sqlcode1+=` AUTO_INCREMENT PRIMARY KEY`; sqlcode2+=` AUTO_INCREMENT PRIMARY KEY`; sqlcode3+=` AUTO_INCREMENT`; - }else if(!!attribute.default){ + }else if(attribute.default != null){ sqlcode1+=` DEFAULT ${con.escape(attribute.default)}`; sqlcode2+=` DEFAULT ${con.escape(attribute.default)}`; sqlcode3+=` DEFAULT ${con.escape(attribute.default)}`;