mirror of
https://github.com/go-gitea/gitea
synced 2025-08-13 04:58:19 +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
@@ -47,7 +47,7 @@ func removeCommitsUnitType(x *xorm.Engine) (err error) {
|
||||
}
|
||||
}
|
||||
team.UnitTypes = ut
|
||||
if _, err := x.Id(team.ID).Cols("unit_types").Update(team); err != nil {
|
||||
if _, err := x.ID(team.ID).Cols("unit_types").Update(team); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user