default 0 error

This commit is contained in:
jusax23 2022-06-29 22:16:14 +02:00
parent 4c26995d86
commit 9ec1156014

2
db.js
View file

@ -54,7 +54,7 @@ const db = function ({host, port, user, password, database}) {
sqlcode1+=` AUTO_INCREMENT PRIMARY KEY`; sqlcode1+=` AUTO_INCREMENT PRIMARY KEY`;
sqlcode2+=` AUTO_INCREMENT PRIMARY KEY`; sqlcode2+=` AUTO_INCREMENT PRIMARY KEY`;
sqlcode3+=` AUTO_INCREMENT`; sqlcode3+=` AUTO_INCREMENT`;
}else if(!!attribute.default){ }else if(attribute.default != null){
sqlcode1+=` DEFAULT ${con.escape(attribute.default)}`; sqlcode1+=` DEFAULT ${con.escape(attribute.default)}`;
sqlcode2+=` DEFAULT ${con.escape(attribute.default)}`; sqlcode2+=` DEFAULT ${con.escape(attribute.default)}`;
sqlcode3+=` DEFAULT ${con.escape(attribute.default)}`; sqlcode3+=` DEFAULT ${con.escape(attribute.default)}`;