diff options
author | 6543 <6543@obermui.de> | 2020-07-22 16:27:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 09:27:22 -0500 |
commit | 2753d72773ae75e326d342757aa0159642a4a794 (patch) | |
tree | 41137eae1e0d423d4ea22434fcd318aca3ade05f /models/migrations/v136.go | |
parent | 8e20daaede6831be1309f5b27af382bbd1d82aad (diff) | |
download | gitea-2753d72773ae75e326d342757aa0159642a4a794.tar.gz gitea-2753d72773ae75e326d342757aa0159642a4a794.zip |
Migrations (v82,v96,v99,v136) remove dependencies (#12286)
* remove dependencys
* add missing fields
* CI.restart()
Diffstat (limited to 'models/migrations/v136.go')
-rw-r--r-- | models/migrations/v136.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/migrations/v136.go b/models/migrations/v136.go index 3f718798ba..2203f15386 100644 --- a/models/migrations/v136.go +++ b/models/migrations/v136.go @@ -11,7 +11,6 @@ import ( "strings" "time" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" @@ -29,7 +28,9 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error { } type PullRequest struct { - ID int64 `xorm:"pk autoincr"` + ID int64 `xorm:"pk autoincr"` + IssueID int64 `xorm:"INDEX"` + Index int64 CommitsAhead int CommitsBehind int @@ -41,7 +42,7 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error { MergedCommitID string `xorm:"VARCHAR(40)"` } - if err := x.Sync2(new(models.PullRequest)); err != nil { + if err := x.Sync2(new(PullRequest)); err != nil { return fmt.Errorf("Sync2: %v", err) } @@ -64,7 +65,7 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error { if err := sess.Begin(); err != nil { return err } - var results = make([]*models.PullRequest, 0, batchSize) + var results = make([]*PullRequest, 0, batchSize) err := sess.Where("has_merged = ?", false).OrderBy("id").Limit(batchSize, last).Find(&results) if err != nil { return err |