summaryrefslogtreecommitdiffstats
path: root/cmd/migrate.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/migrate.go')
-rw-r--r--cmd/migrate.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/migrate.go b/cmd/migrate.go
index 1fa1d09e25..2428925887 100644
--- a/cmd/migrate.go
+++ b/cmd/migrate.go
@@ -5,6 +5,8 @@
package cmd
import (
+ "context"
+
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/migrations"
"code.gitea.io/gitea/modules/log"
@@ -32,7 +34,7 @@ func runMigrate(ctx *cli.Context) error {
log.Trace("Log path: %s", setting.LogRootPath)
setting.InitDBConfig()
- if err := models.NewEngine(migrations.Migrate); err != nil {
+ if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {
log.Fatal("Failed to initialize ORM engine: %v", err)
return err
}