mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
make fmt
This commit is contained in:
parent
8adc25ac6f
commit
5ef3cf4f47
@ -585,7 +585,6 @@ func EnsureUpToDate(x *xorm.Engine) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Migrate database to current version
|
// Migrate database to current version
|
||||||
func Migrate(x *xorm.Engine) error {
|
func Migrate(x *xorm.Engine) error {
|
||||||
// Set a new clean the default mapper to GonicMapper as that is the default for Gitea.
|
// Set a new clean the default mapper to GonicMapper as that is the default for Gitea.
|
||||||
|
@ -8,14 +8,16 @@ import (
|
|||||||
|
|
||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"src.techknowlogick.com/xormigrate"
|
|
||||||
|
|
||||||
|
"src.techknowlogick.com/xormigrate"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
const minDBVersion = 70 // Gitea 1.5.3
|
const (
|
||||||
const oldMigrationsCount = 230
|
minDBVersion = 70 // Gitea 1.5.3
|
||||||
const expectedVersion = minDBVersion+oldMigrationsCount
|
oldMigrationsCount = 230
|
||||||
|
expectedVersion = minDBVersion + oldMigrationsCount
|
||||||
|
)
|
||||||
|
|
||||||
var oldMigrationNames = []string{
|
var oldMigrationNames = []string{
|
||||||
"add issue_dependencies",
|
"add issue_dependencies",
|
||||||
@ -101,8 +103,8 @@ var oldMigrationNames = []string{
|
|||||||
"add primary key to repo_topic",
|
"add primary key to repo_topic",
|
||||||
"set default password algorithm to Argon2",
|
"set default password algorithm to Argon2",
|
||||||
"add TrustModel field to Repository",
|
"add TrustModel field to Repository",
|
||||||
"add Team review request support",
|
"add Team review request support",
|
||||||
"add timestamps to Star, Label, Follow, Watch and Collaboration",
|
"add timestamps to Star, Label, Follow, Watch and Collaboration",
|
||||||
"add changed_protected_files column for pull_request table",
|
"add changed_protected_files column for pull_request table",
|
||||||
"fix publisher ID for tag releases",
|
"fix publisher ID for tag releases",
|
||||||
"ensure repo topics are up-to-date",
|
"ensure repo topics are up-to-date",
|
||||||
|
Loading…
Reference in New Issue
Block a user