migrations/v16: sync table

pull/4280/head
Unknwon 2017-03-12 03:05:41 -04:00
parent bb19bb601e
commit a34c21cde3
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ func updateRepositorySizes(x *xorm.Engine) (err error) {
ID int64 ID int64
Name string Name string
} }
if err = x.Sync2(new(Repository)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
return x.Where("id > 0").Iterate(new(Repository), return x.Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error { func(idx int, bean interface{}) error {
repo := bean.(*Repository) repo := bean.(*Repository)