summaryrefslogtreecommitdiffstats
path: root/models/migrations/v56.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v56.go')
-rw-r--r--models/migrations/v56.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/models/migrations/v56.go b/models/migrations/v56.go
index 1f96cc543e..79f8ce0ba5 100644
--- a/models/migrations/v56.go
+++ b/models/migrations/v56.go
@@ -9,5 +9,15 @@ import (
)
func removeIsOwnerColumnFromOrgUser(x *xorm.Engine) (err error) {
- return dropTableColumns(x, "org_user", "is_owner", "num_teams")
+ sess := x.NewSession()
+ defer sess.Close()
+
+ if err = sess.Begin(); err != nil {
+ return err
+ }
+
+ if err := dropTableColumns(sess, "org_user", "is_owner", "num_teams"); err != nil {
+ return err
+ }
+ return sess.Commit()
}