diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-01-31 10:42:45 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 21:42:45 +0800 |
commit | d816f7018b0726f868fa0cddf02ffae184601395 (patch) | |
tree | ff1a08e7dab91a45afef0e53a5d006f074613987 /models/migrations/v70.go | |
parent | b3d8e2d4f7a0ebf768ab6bcb102755839a6b9311 (diff) | |
download | gitea-d816f7018b0726f868fa0cddf02ffae184601395.tar.gz gitea-d816f7018b0726f868fa0cddf02ffae184601395.zip |
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>
Diffstat (limited to 'models/migrations/v70.go')
-rw-r--r-- | models/migrations/v70.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/models/migrations/v70.go b/models/migrations/v70.go index ef8dd85d6d..ea7ead60d8 100644 --- a/models/migrations/v70.go +++ b/models/migrations/v70.go @@ -26,6 +26,18 @@ func addIssueDependencies(x *xorm.Engine) (err error) { UpdatedUnix int64 `xorm:"updated"` } + 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 + ) + if err = x.Sync(new(IssueDependency)); err != nil { return fmt.Errorf("Error creating issue_dependency_table column definition: %v", err) } @@ -80,7 +92,7 @@ func addIssueDependencies(x *xorm.Engine) (err error) { //Updating existing issue units units := make([]*RepoUnit, 0, 100) - err = x.Where("`type` = ?", V16UnitTypeIssues).Find(&units) + err = x.Where("`type` = ?", v16UnitTypeIssues).Find(&units) if err != nil { return fmt.Errorf("Query repo units: %v", err) } |