mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 10:58:35 +08:00
【更新】更新pg代码生成
This commit is contained in:
@@ -77,10 +77,10 @@ func (m *devGenTableModelImpl) FindDbTableOne(tableName string) *entity.DBTables
|
||||
biz.ErrIsNil(errors.New("只支持mysql和postgresql数据库"), "只支持mysql和postgresql数据库")
|
||||
}
|
||||
db := global.Db.Table("information_schema.tables")
|
||||
if global.Conf.Server.DbType != "mysql" {
|
||||
if global.Conf.Server.DbType == "mysql" {
|
||||
db = db.Where("table_schema= ? ", global.Conf.Gen.Dbname)
|
||||
}
|
||||
if global.Conf.Server.DbType != "postgresql" {
|
||||
if global.Conf.Server.DbType == "postgresql" {
|
||||
db = db.Where("table_schema= ? ", "public")
|
||||
}
|
||||
db = db.Where("table_name = ?", tableName)
|
||||
|
||||
Reference in New Issue
Block a user