summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index 9eb174e200..74680d847a 100644
--- a/models/models.go
+++ b/models/models.go
@@ -128,7 +128,12 @@ func getEngine() (*xorm.Engine, error) {
return nil, err
}
- return xorm.NewEngine(setting.Database.Type, connStr)
+ engine, err := xorm.NewEngine(setting.Database.Type, connStr)
+ if err != nil {
+ return nil, err
+ }
+ engine.SetSchema(setting.Database.Schema)
+ return engine, nil
}
// NewTestEngine sets a new test xorm.Engine