Fixed table sync error (#4303)
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
parent
d1f1b7a5c2
commit
8d0787c1a9
|
|
@ -5,6 +5,7 @@
|
|||
package migrations
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
|
|
@ -20,6 +21,13 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) {
|
|||
Name string `xorm:"unique"`
|
||||
}
|
||||
|
||||
if err := x.Sync2(new(models.Topic)); err != nil {
|
||||
return fmt.Errorf("Sync2: %v", err)
|
||||
}
|
||||
if err := x.Sync2(new(models.RepoTopic)); err != nil {
|
||||
return fmt.Errorf("Sync2: %v", err)
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user