diff --git a/go.mod b/go.mod index a929ca80..e3fceff2 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,6 @@ require ( src.techknowlogick.com/xgo v1.5.1-0.20220906164532-735bfdfb90d9 src.techknowlogick.com/xormigrate v1.4.0 xorm.io/builder v0.3.9 - xorm.io/core v0.7.3 xorm.io/xorm v1.1.2 ) diff --git a/pkg/db/db.go b/pkg/db/db.go index 54de35b0..08e834d1 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -27,9 +27,9 @@ import ( "code.vikunja.io/api/pkg/config" "code.vikunja.io/api/pkg/log" xrc "gitea.com/xorm/xorm-redis-cache" - "xorm.io/core" "xorm.io/xorm" "xorm.io/xorm/caches" + "xorm.io/xorm/names" "xorm.io/xorm/schemas" _ "github.com/go-sql-driver/mysql" // Because. @@ -80,7 +80,7 @@ func CreateDBEngine() (engine *xorm.Engine, err error) { log.Fatalf("Error parsing time zone: %s", err) } engine.SetTZDatabase(loc) - engine.SetMapper(core.GonicMapper{}) + engine.SetMapper(names.GonicMapper{}) logger := log.NewXormLogger("") engine.SetLogger(logger) diff --git a/pkg/db/test.go b/pkg/db/test.go index 2998517f..9ebc8c3d 100644 --- a/pkg/db/test.go +++ b/pkg/db/test.go @@ -23,9 +23,10 @@ import ( "code.vikunja.io/api/pkg/config" "code.vikunja.io/api/pkg/log" + "github.com/stretchr/testify/assert" - "xorm.io/core" "xorm.io/xorm" + "xorm.io/xorm/names" ) // CreateTestEngine creates an instance of the db engine which lives in memory @@ -48,7 +49,7 @@ func CreateTestEngine() (engine *xorm.Engine, err error) { } } - engine.SetMapper(core.GonicMapper{}) + engine.SetMapper(names.GonicMapper{}) logger := log.NewXormLogger("DEBUG") logger.ShowSQL(os.Getenv("UNIT_TESTS_VERBOSE") == "1") engine.SetLogger(logger)