From 9ec1156014955cd47b360a2c888a415fb1583d2c Mon Sep 17 00:00:00 2001 From: jusax23 Date: Wed, 29 Jun 2022 22:16:14 +0200 Subject: [PATCH] default 0 error --- db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)}`;