diff options
author | Lauris BH <lauris@nix.lv> | 2017-07-02 16:50:57 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-07-02 21:50:57 +0800 |
commit | f189ccd2d60231485f045ce70a523fe12e401912 (patch) | |
tree | 6aff9591c4b486a155e2a8d8dc8bfe9cc143ecbb /routers/init.go | |
parent | f99489d5c522663cfc14b9b65539966844f3ee6b (diff) | |
download | gitea-f189ccd2d60231485f045ce70a523fe12e401912.tar.gz gitea-f189ccd2d60231485f045ce70a523fe12e401912.zip |
Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
Diffstat (limited to 'routers/init.go')
-rw-r--r-- | routers/init.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/init.go b/routers/init.go index dec7f1818f..ad624d3b7a 100644 --- a/routers/init.go +++ b/routers/init.go @@ -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 |