Browse Source

Issue with Migration rule v111 (#9449)

* Issue with Migration rule v111

I was facing some issues with migration rule v111

* Update v111.go

Fix pgsql test cases

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
tags/v1.11.0-rc1
Marge Bouvier Antoine GIRARD 6 years ago
parent
commit
ec926401de
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      models/migrations/v111.go

+ 3
- 0
models/migrations/v111.go View File

@@ -34,6 +34,9 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error {
return err
}

if _, err := sess.Exec("UPDATE `protected_branch` SET `enable_whitelist` = ? WHERE enable_whitelist IS NULL", false); err != nil {
return err
}
if _, err := sess.Exec("UPDATE `protected_branch` SET `can_push` = `enable_whitelist`"); err != nil {
return err
}


Loading…
Cancel
Save