test
This commit is contained in:
parent
f110275228
commit
968035909d
9
sql.go
9
sql.go
@ -28,8 +28,13 @@ func initDB() {
|
||||
err = rows.Scan(&name)
|
||||
failOnError(err, "initDB : show tables listing")
|
||||
|
||||
_, err = tx.Exec("drop table " + name)
|
||||
failOnError(err, "initDB : drop table "+name)
|
||||
if ok, _ := regexp.MatchString(`^.*_v$`, name); !ok {
|
||||
_, err = tx.Exec("drop view " + name)
|
||||
failOnError(err, "initDB : drop view "+name)
|
||||
} else {
|
||||
_, err = tx.Exec("drop table " + name)
|
||||
failOnError(err, "initDB : drop table "+name)
|
||||
}
|
||||
}
|
||||
err = rows.Err()
|
||||
failOnError(err, "initDB : show tables listing end")
|
||||
|
Loading…
Reference in New Issue
Block a user