gf gen dao cannot synchronize postgres schemas other than public
Go version
1.25.1
GoFrame version
2.9
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
hack/config.yaml gfcli: gen: dao:
# ========== TPF模式 ==========
- link: "pgsql:postgres:password@tcp(192.168.22.2:54321)/hmapp?search_path=tpf"
namespace: "tpf"
group: "tpf"
tables: ""
tablesEx: "assess_main,assess_proc" # 排除有问题的表
jsonCase: "CamelLower"
descriptionTag: true
noModelComment: false
clear: false
# TPF模式代码存放路径
path: ""
daoPath: "./app/dao/tpf"
modelPath: "./app/model/tpf"
doPath: "./app/model/do/tpf"
entityPath: "./app/model/entity/tpf"
stdTime: false
withTime: true
gJsonSupport: true
overwriteDao: false
importPrefix: "base"
typeMapping:
int8: int64
int4: int
int2: int
float4: float32
float8: float64
bool: bool
text: string
varchar: string
char: string
date: "*gtime.Time"
timestamp: "*gtime.Time"
timestamptz: "*gtime.Time"
run command: gf gen dao
What did you see happen?
Regardless of your settings, gf gen dao will only synchronize the public schema of your database. Other schemas will not be synchronized.
PS D:\SynologyDrive\GO\二手车交易系统\正式版\go_gds> gf version v2.9.4 Welcome to GoFrame! Env Detail: Go Version: go1.25.1 windows/amd64 GF Version(go.mod): github.com/gogf/gf/contrib/drivers/pgsql/[email protected] github.com/gogf/gf/contrib/nosql/redis/[email protected] github.com/gogf/gf/[email protected] CLI Detail: Installed At: D:\Program Files\go\bin\gf.exe Built Go Version: go1.25.2 Built GF Version: v2.9.4 Git Commit: 2025-10-11 14:58:01 2b7b4c85814f7dc33678f788cb4bbf0b06c417d1 Built Time: 2025-10-11 15:08:39 Others Detail: Docs: https://goframe.org Now : 2025-10-25T12:06:56+08:00
What did you expect to see?
synchronize all schemas in the postgres database instead of just the public one.