mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-08 02:31:36 +02:00
fix: make installing Forgejo work again
- 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
This commit is contained in:
parent
d28a64e538
commit
0be1fb749a
1 changed files with 2 additions and 4 deletions
|
@ -6,12 +6,10 @@ package install
|
|||
import (
|
||||
"forgejo.org/models/db"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func getXORMEngine() *xorm.Engine {
|
||||
return db.DefaultContext.(*db.Context).Engine().(*xorm.Engine)
|
||||
func getXORMEngine() db.Engine {
|
||||
return db.DefaultContext.(*db.Context).Engine()
|
||||
}
|
||||
|
||||
// CheckDatabaseConnection checks the database connection
|
||||
|
|
Loading…
Add table
Reference in a new issue