Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix column droping for MySQL that need a new session for the new transaction #4459

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions models/migrations/v64.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ func addMultipleAssignees(x *xorm.Engine) error {
if err := sess.Commit(); err != nil {
return err
}

sess.Close()
sess = x.NewSession()
defer sess.Close()

if err := sess.Begin(); err != nil {
return err
}
Expand Down
5 changes: 5 additions & 0 deletions models/migrations/v69.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ func moveTeamUnitsToTeamUnitTable(x *xorm.Engine) error {
if err := sess.Commit(); err != nil {
return err
}

sess.Close()
sess = x.NewSession()
defer sess.Close()

if err := sess.Begin(); err != nil {
return err
}
Expand Down