mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Remove migration support from versions earlier than 1.6.0 (#10026)
* Remove migration support from versions earlier than 1.6.0 * Remove unused functions * Update gogs upgrade instructions * Improve "latest" link as per @jolheiser Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -22,6 +22,18 @@ func addPullRequestRebaseWithMerge(x *xorm.Engine) error {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX CREATED"`
|
||||
}
|
||||
|
||||
const (
|
||||
v16UnitTypeCode = iota + 1 // 1 code
|
||||
v16UnitTypeIssues // 2 issues
|
||||
v16UnitTypePRs // 3 PRs
|
||||
v16UnitTypeCommits // 4 Commits
|
||||
v16UnitTypeReleases // 5 Releases
|
||||
v16UnitTypeWiki // 6 Wiki
|
||||
v16UnitTypeSettings // 7 Settings
|
||||
v16UnitTypeExternalWiki // 8 ExternalWiki
|
||||
v16UnitTypeExternalTracker // 9 ExternalTracker
|
||||
)
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
if err := sess.Begin(); err != nil {
|
||||
@@ -30,7 +42,7 @@ func addPullRequestRebaseWithMerge(x *xorm.Engine) error {
|
||||
|
||||
//Updating existing issue units
|
||||
units := make([]*RepoUnit, 0, 100)
|
||||
if err := sess.Where("`type` = ?", V16UnitTypePRs).Find(&units); err != nil {
|
||||
if err := sess.Where("`type` = ?", v16UnitTypePRs).Find(&units); err != nil {
|
||||
return fmt.Errorf("Query repo units: %v", err)
|
||||
}
|
||||
for _, unit := range units {
|
||||
|
Reference in New Issue
Block a user