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

This commit is contained in:
back2root 2018-07-18 00:08:15 +02:00
parent 1bff02de55
commit a4a7dd0660
2 changed files with 10 additions and 0 deletions

View File

@ -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
}

View File

@ -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
}