1
0

Update xorm to use the new import path (#133)

Fix ineffassign

Fix getting all labels including the ones not associated to a task

Signed-off-by: kolaente <k@knt.li>

Fix logging sql queries

Signed-off-by: kolaente <k@knt.li>

Start fixing getting all labels

Update xormigrate

Update xorm to use the new import path

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/133
This commit is contained in:
konrad
2020-02-14 16:34:25 +00:00
parent 014ec2be69
commit caf91d1904
263 changed files with 27131 additions and 14939 deletions

View File

@ -20,9 +20,9 @@ package db
import (
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/log"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
"os"
"xorm.io/core"
"xorm.io/xorm"
)
// CreateTestEngine creates an instance of the db engine which lives in memory
@ -46,8 +46,9 @@ func CreateTestEngine() (engine *xorm.Engine, err error) {
}
engine.SetMapper(core.GonicMapper{})
engine.ShowSQL(os.Getenv("UNIT_TESTS_VERBOSE") == "1")
engine.SetLogger(xorm.NewSimpleLogger(log.GetLogWriter("database")))
logger := xorm.NewSimpleLogger(log.GetLogWriter("database"))
logger.ShowSQL(os.Getenv("UNIT_TESTS_VERBOSE") == "1")
engine.SetLogger(logger)
x = engine
return
}