mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
fix #440 only get these tables information in custom the option ‘-tables’
This commit is contained in:
parent
0000e7d7c9
commit
8b01334faf
@ -298,7 +298,14 @@ func gen(dbms, connStr string, mode byte, selectedTableNames map[string]bool, ap
|
|||||||
defer db.Close()
|
defer db.Close()
|
||||||
if trans, ok := dbDriver[dbms]; ok {
|
if trans, ok := dbDriver[dbms]; ok {
|
||||||
beeLogger.Log.Info("Analyzing database tables...")
|
beeLogger.Log.Info("Analyzing database tables...")
|
||||||
tableNames := trans.GetTableNames(db)
|
var tableNames []string
|
||||||
|
if len(selectedTableNames) != 0 {
|
||||||
|
for tableName := range selectedTableNames {
|
||||||
|
tableNames = append(tableNames, tableName)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tableNames = trans.GetTableNames(db)
|
||||||
|
}
|
||||||
tables := getTableObjects(tableNames, db, trans)
|
tables := getTableObjects(tableNames, db, trans)
|
||||||
mvcPath := new(MvcPath)
|
mvcPath := new(MvcPath)
|
||||||
mvcPath.ModelPath = path.Join(apppath, "models")
|
mvcPath.ModelPath = path.Join(apppath, "models")
|
||||||
|
Loading…
Reference in New Issue
Block a user