fix: make installing Forgejo work again (#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 <earl-warren@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
afea42d517
commit
99fc04b763
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
Add a link
Reference in a new issue