mirror of
https://github.com/go-gitea/gitea
synced 2025-08-13 21:18:21 +00:00
* Rewrite migrations to not depend on future code changes (#2604) * v38 migration used an outdated version of RepoUnit model (#2602) * change repoUnit model in migration * fix v16 migration repo_unit table * fix lint error * move type definition inside function * Fix migration from Gogs * Refactor code * add error check * Additiomal fixes for migrations * Add back nil check * replace deprecated .Id with .ID Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * change string map to interface map Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
This commit is contained in:
committed by
Lauris BH
parent
d1cec5ecfa
commit
74399f333f
@@ -33,9 +33,9 @@ func addUnitsToTables(x *xorm.Engine) error {
|
||||
RepoID int64 `xorm:"INDEX(s)"`
|
||||
Type int `xorm:"INDEX(s)"`
|
||||
Index int
|
||||
Config map[string]string `xorm:"JSON"`
|
||||
CreatedUnix int64 `xorm:"INDEX CREATED"`
|
||||
Created time.Time `xorm:"-"`
|
||||
Config map[string]interface{} `xorm:"JSON"`
|
||||
CreatedUnix int64 `xorm:"INDEX CREATED"`
|
||||
Created time.Time `xorm:"-"`
|
||||
}
|
||||
|
||||
// Repo describes a repository
|
||||
@@ -95,7 +95,7 @@ func addUnitsToTables(x *xorm.Engine) error {
|
||||
continue
|
||||
}
|
||||
|
||||
var config = make(map[string]string)
|
||||
var config = make(map[string]interface{})
|
||||
switch i {
|
||||
case V16UnitTypeExternalTracker:
|
||||
config["ExternalTrackerURL"] = repo.ExternalTrackerURL
|
||||
|
Reference in New Issue
Block a user