Skip to content

Commit f37c287

Browse files
wxiaoguang6543
andauthored
Update models/migrations/v197.go
Co-authored-by: 6543 <[email protected]>
1 parent f613828 commit f37c287

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

models/migrations/v197.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ func addTableIssueContentHistory(x *xorm.Engine) error {
2424
IsDeleted bool
2525
}
2626

27-
if err := x.Sync2(new(IssueContentHistory)); err != nil {
28-
return fmt.Errorf("Sync2: %v", err)
29-
}
30-
3127
sess := x.NewSession()
3228
defer sess.Close()
29+
if err := sess.Sync2(new(IssueContentHistory)); err != nil {
30+
return fmt.Errorf("Sync2: %v", err)
31+
}
3332
return sess.Commit()
3433
}

0 commit comments

Comments
 (0)