Skip to content

Commit 1faa39b

Browse files
GiteaBotwolfogre
andauthored
Drop migration for ForeignReference (#23605) (#23666)
Backport #23605 by @wolfogre Fix #21086 (comment) Related to #21721 Co-authored-by: Jason Song <i@wolfogre.com>
1 parent 780f71c commit 1faa39b

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

models/migrations/v1_17/v211.go

+2-15
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,9 @@
44
package v1_17 //nolint
55

66
import (
7-
"fmt"
8-
97
"xorm.io/xorm"
108
)
119

12-
func CreateForeignReferenceTable(x *xorm.Engine) error {
13-
type ForeignReference struct {
14-
// RepoID is the first column in all indices. now we only need 2 indices: (repo, local) and (repo, foreign, type)
15-
RepoID int64 `xorm:"UNIQUE(repo_foreign_type) INDEX(repo_local)" `
16-
LocalIndex int64 `xorm:"INDEX(repo_local)"` // the resource key inside Gitea, it can be IssueIndex, or some model ID.
17-
ForeignIndex string `xorm:"INDEX UNIQUE(repo_foreign_type)"`
18-
Type string `xorm:"VARCHAR(16) INDEX UNIQUE(repo_foreign_type)"`
19-
}
20-
21-
if err := x.Sync2(new(ForeignReference)); err != nil {
22-
return fmt.Errorf("Sync2: %w", err)
23-
}
24-
return nil
10+
func CreateForeignReferenceTable(_ *xorm.Engine) error {
11+
return nil // This table was dropped in v1_19/v237.go
2512
}

0 commit comments

Comments
 (0)