数据库升级时表名不区分大小写/增加一些注释

This commit is contained in:
刘祥超
2021-04-18 16:32:08 +08:00
parent 7217785c58
commit 9eb2cce860
4 changed files with 10 additions and 10 deletions

View File

@@ -1,12 +1,14 @@
package setup
import "strings"
type SQLDumpResult struct {
Tables []*SQLTable `json:"tables"`
}
func (this *SQLDumpResult) FindTable(tableName string) *SQLTable {
for _, table := range this.Tables {
if table.Name == tableName {
if strings.ToLower(table.Name) == strings.ToLower(tableName) {
return table
}
}