Skip to content

Commit 99fc04b

Browse files
GustedEarl Warren
authored andcommitted
fix: make installing Forgejo work again (go-gitea#7452)
- The default engine is no longer guaranteed to be of the type `*xorm.Engine`, so instead return the interface `db.Engine`. - Regression of forgejo/forgejo#7212 # Testing 1. Install a Forgejo instance via the setup screen. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7452 Reviewed-by: Earl Warren <[email protected]> Co-authored-by: Gusted <[email protected]> Co-committed-by: Gusted <[email protected]>
1 parent afea42d commit 99fc04b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

models/db/install/db.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ package install
66
import (
77
"forgejo.org/models/db"
88
"forgejo.org/modules/setting"
9-
10-
"xorm.io/xorm"
119
)
1210

13-
func getXORMEngine() *xorm.Engine {
14-
return db.DefaultContext.(*db.Context).Engine().(*xorm.Engine)
11+
func getXORMEngine() db.Engine {
12+
return db.DefaultContext.(*db.Context).Engine()
1513
}
1614

1715
// CheckDatabaseConnection checks the database connection

0 commit comments

Comments
 (0)