* Changed migration calling so that migrations can use models package
This commit is contained in:
parent
f99489d5c5
commit
f189ccd2d6
5 changed files with 28 additions and 7 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
"code.gitea.io/git"
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/migrations"
|
||||
"code.gitea.io/gitea/modules/cron"
|
||||
"code.gitea.io/gitea/modules/highlight"
|
||||
"code.gitea.io/gitea/modules/indexer"
|
||||
|
@ -50,7 +51,7 @@ func GlobalInit() {
|
|||
if setting.InstallLock {
|
||||
highlight.NewContext()
|
||||
markdown.NewSanitizer()
|
||||
if err := models.NewEngine(); err != nil {
|
||||
if err := models.NewEngine(migrations.Migrate); err != nil {
|
||||
log.Fatal(4, "Failed to initialize ORM engine: %v", err)
|
||||
}
|
||||
models.HasEngine = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue