parent
e45183ceb8
commit
496b3cbde9
|
@ -1,4 +1,5 @@
|
|||
# 3.0.9 / 2019-09-23
|
||||
# 3.0.10 / 2019-09-23
|
||||
* 优化数据库/表的删除判断;
|
||||
* 优化创建数据库/表时的默认配置顶;
|
||||
* 优化字段的默认值0的判断
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ class Api {
|
|||
let defer = Promise.defer()
|
||||
|
||||
this.connect().then(conn => {
|
||||
conn.query(`DROP DATABASE ${db || this.db}`, (err, result) => {
|
||||
conn.query(`DROP DATABASE IF EXISTS \`${db || this.db}\``, err => {
|
||||
conn.release()
|
||||
if (err) {
|
||||
return defer.reject(new SqlErr(`Drop database ${err}`))
|
||||
|
|
|
@ -302,7 +302,7 @@ class Method {
|
|||
}
|
||||
|
||||
drop() {
|
||||
let sql = `DROP TABLE ${this.cache.table} `
|
||||
let sql = `DROP TABLE IF EXISTS \`${this.cache.table}\` `
|
||||
|
||||
return this.connect().then(conn => {
|
||||
const defer = Promise.defer()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mysqli",
|
||||
"version": "3.0.9",
|
||||
"version": "3.0.10",
|
||||
"description": "MySQL tool",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue