tablePrefix

This commit is contained in:
pengnanfang
2021-01-14 23:05:39 +08:00
parent a0b28c4088
commit 14e0bb177f
2 changed files with 15 additions and 1 deletions

View File

@@ -218,6 +218,11 @@ func (m *mysqlModel) getTables(orm *mysqldb.MySqlDB) map[string]string {
for rows.Next() {
var table string
rows.Scan(&table)
tablePrefix := config.GetTablePrefix()
if tablePrefix != "" && !strings.Contains(table, tablePrefix) {
// 不包含前缀则跳过
continue
}
tables = append(tables, table)
tbDesc[table] = ""
}