summaryrefslogtreecommitdiffstats
path: root/models/db/engine.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/db/engine.go')
-rwxr-xr-xmodels/db/engine.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/db/engine.go b/models/db/engine.go
index 5020101d49..56dd209fd7 100755
--- a/models/db/engine.go
+++ b/models/db/engine.go
@@ -101,12 +101,12 @@ func newXORMEngine() (*xorm.Engine, error) {
var engine *xorm.Engine
- if setting.Database.UsePostgreSQL && len(setting.Database.Schema) > 0 {
+ if setting.Database.Type.IsPostgreSQL() && len(setting.Database.Schema) > 0 {
// OK whilst we sort out our schema issues - create a schema aware postgres
registerPostgresSchemaDriver()
engine, err = xorm.NewEngine("postgresschema", connStr)
} else {
- engine, err = xorm.NewEngine(setting.Database.Type, connStr)
+ engine, err = xorm.NewEngine(setting.Database.Type.String(), connStr)
}
if err != nil {