修改查询table sql语句 兼容性

This commit is contained in:
pixel
2020-07-07 10:02:20 +08:00
parent 7a31de2960
commit 35b507204c
2 changed files with 3 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ func GetAllTplFile(pathName string, fileList []string) ([]string, error) {
}
func GetTables(dbName string) (err error, TableNames []request.TableReq) {
err = global.GVA_DB.Raw("select table_name from information_schema.tables where table_schema= ? and table_type= ? ", dbName, "base table").Scan(&TableNames).Error
err = global.GVA_DB.Raw("select table_name as table_name from information_schema.tables where table_schema = ?", dbName).Scan(&TableNames).Error
return err, TableNames
}