fix: add const value for public scheam name of postgres. (#877)
This commit is contained in:
parent
468154dfd5
commit
0b841796fa
|
@ -769,6 +769,8 @@ var (
|
|||
DefaultPostgresSchema = "public"
|
||||
)
|
||||
|
||||
const postgresPublicSchema = "public"
|
||||
|
||||
type postgres struct {
|
||||
core.Base
|
||||
}
|
||||
|
|
|
@ -551,7 +551,7 @@ func (engine *Engine) tbSchemaName(v string) string {
|
|||
// Only for postgres database.
|
||||
if engine.dialect.DBType() == core.POSTGRES &&
|
||||
engine.dialect.URI().Schema != "" &&
|
||||
engine.dialect.URI().Schema != DefaultPostgresSchema &&
|
||||
engine.dialect.URI().Schema != postgresPublicSchema &&
|
||||
strings.Index(v, ".") == -1 {
|
||||
return engine.dialect.URI().Schema + "." + v
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue