diff options
Diffstat (limited to 'models/migrations/v111.go')
-rw-r--r-- | models/migrations/v111.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/migrations/v111.go b/models/migrations/v111.go index cf57e35dff..30128abd04 100644 --- a/models/migrations/v111.go +++ b/models/migrations/v111.go @@ -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 } |