mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-20 03:11:35 +02:00
fix var overwrite
This commit is contained in:
parent
1f354cf1f9
commit
17c4b5ea01
1 changed files with 3 additions and 3 deletions
|
@ -37,13 +37,13 @@ func runMigrate(ctx *cli.Context) error {
|
|||
log.Info("Log path: %s", setting.Log.RootPath)
|
||||
log.Info("Configuration file: %s", setting.CustomConf)
|
||||
|
||||
if err := db.InitEngineWithMigration(context.Background(), func(engine db.Engine) error {
|
||||
if err := db.InitEngineWithMigration(context.Background(), func(dbEngine db.Engine) error {
|
||||
var e *xorm.Engine
|
||||
engine, err := db.GetMasterEngine(e)
|
||||
masterEngine, err := db.GetMasterEngine(e)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return migrations.Migrate(e)
|
||||
return migrations.Migrate(masterEngine)
|
||||
}); err != nil {
|
||||
log.Fatal("Failed to initialize ORM engine: %v", err)
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue