【更新】更新pg代码生成

This commit is contained in:
PandaGoAdmin
2022-08-19 11:49:27 +08:00
parent cb6a710135
commit f0e235d22f
8 changed files with 321 additions and 201 deletions

View File

@@ -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)