mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-21 01:14:31 +08:00
Fix column droping for MSSQL that need new transaction for that (#4440)
This commit is contained in:
parent
659bc727bd
commit
e95417ea2c
@ -120,6 +120,14 @@ func addMultipleAssignees(x *xorm.Engine) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Commit and begin new transaction for dropping columns
|
||||
if err := sess.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := dropTableColumns(sess, "issue", "assignee_id"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -73,6 +73,14 @@ func moveTeamUnitsToTeamUnitTable(x *xorm.Engine) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Commit and begin new transaction for dropping columns
|
||||
if err := sess.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := dropTableColumns(sess, "team", "unit_types"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user