test
This commit is contained in:
parent
f110275228
commit
968035909d
5
sql.go
5
sql.go
@ -28,9 +28,14 @@ func initDB() {
|
||||
err = rows.Scan(&name)
|
||||
failOnError(err, "initDB : show tables listing")
|
||||
|
||||
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")
|
||||
rows.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user