Skip to content

Commit

Permalink
Issue with Migration rule v111 (#9449)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
MarcelHillmann and sapk committed Dec 21, 2019
1 parent 4f42e03 commit 8149ed7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/migrations/v111.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8149ed7

Please sign in to comment.