loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Drop migration for ForeignReference (#23605)

Fix
https://github.com/go-gitea/gitea/issues/21086#issuecomment-1476560381

Related to #21721

authored by

Jason Song and committed by
GitHub
9f39def9 9cefb7be

+2 -15
+2 -15
models/migrations/v1_17/v211.go
··· 4 4 package v1_17 //nolint 5 5 6 6 import ( 7 - "fmt" 8 - 9 7 "xorm.io/xorm" 10 8 ) 11 9 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 25 12 }