mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
* 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
|
@ -120,6 +120,8 @@ var migrations = []Migration{
|
|||
NewMigration("give all units to owner teams", giveAllUnitsToOwnerTeams),
|
||||
// v35 -> v36
|
||||
NewMigration("adds comment to an action", addCommentIDToAction),
|
||||
// v36 -> v37
|
||||
NewMigration("regenerate git hooks", regenerateGitHooks36),
|
||||
}
|
||||
|
||||
// Migrate database to current version
|
||||
|
|
15
models/migrations/v36.go
Normal file
15
models/migrations/v36.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2017 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/models"
|
||||
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
|
||||
func regenerateGitHooks36(x *xorm.Engine) (err error) {
|
||||
return models.SyncRepositoryHooks()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue