1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)

* upgrade xorm to v1.0.1

* fix start fail with postgres

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao
2020-03-25 22:32:23 +08:00
committed by GitHub
parent b10cb7b258
commit 73f5ca70de
25 changed files with 226 additions and 149 deletions

7
vendor/xorm.io/xorm/xorm.go generated vendored
View File

@@ -13,6 +13,7 @@ import (
"time"
"xorm.io/xorm/caches"
"xorm.io/xorm/core"
"xorm.io/xorm/dialects"
"xorm.io/xorm/log"
"xorm.io/xorm/names"
@@ -32,6 +33,11 @@ func NewEngine(driverName string, dataSourceName string) (*Engine, error) {
return nil, err
}
db, err := core.Open(driverName, dataSourceName)
if err != nil {
return nil, err
}
cacherMgr := caches.NewManager()
mapper := names.NewCacheMapper(new(names.SnakeMapper))
tagParser := tags.NewParser("xorm", dialect, mapper, mapper, cacherMgr)
@@ -44,6 +50,7 @@ func NewEngine(driverName string, dataSourceName string) (*Engine, error) {
tagParser: tagParser,
driverName: driverName,
dataSourceName: dataSourceName,
db: db,
}
if dialect.URI().DBType == schemas.SQLITE {