mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* Changed migration calling so that migrations can use models package
This commit is contained in:
@@ -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()
|
||||
}
|
Reference in New Issue
Block a user