···44package v1_17 //nolint
5566import (
77- "fmt"
88-97 "xorm.io/xorm"
108)
1191212-func CreateForeignReferenceTable(x *xorm.Engine) error {
1313- type ForeignReference struct {
1414- // RepoID is the first column in all indices. now we only need 2 indices: (repo, local) and (repo, foreign, type)
1515- RepoID int64 `xorm:"UNIQUE(repo_foreign_type) INDEX(repo_local)" `
1616- LocalIndex int64 `xorm:"INDEX(repo_local)"` // the resource key inside Gitea, it can be IssueIndex, or some model ID.
1717- ForeignIndex string `xorm:"INDEX UNIQUE(repo_foreign_type)"`
1818- Type string `xorm:"VARCHAR(16) INDEX UNIQUE(repo_foreign_type)"`
1919- }
2020-2121- if err := x.Sync2(new(ForeignReference)); err != nil {
2222- return fmt.Errorf("Sync2: %w", err)
2323- }
2424- return nil
1010+func CreateForeignReferenceTable(_ *xorm.Engine) error {
1111+ return nil // This table was dropped in v1_19/v237.go
2512}