This commit is contained in:
shoopea 2019-07-08 11:49:56 +08:00
parent 968035909d
commit f96f43c997

2
sql.go
View File

@ -28,7 +28,7 @@ func initDB() {
err = rows.Scan(&name) err = rows.Scan(&name)
failOnError(err, "initDB : show tables listing") failOnError(err, "initDB : show tables listing")
if ok, _ := regexp.MatchString(`^.*_v$`, name); !ok { if ok, _ := regexp.MatchString(`^.*_v$`, name); ok {
_, err = tx.Exec("drop view " + name) _, err = tx.Exec("drop view " + name)
failOnError(err, "initDB : drop view "+name) failOnError(err, "initDB : drop view "+name)
} else { } else {