summaryrefslogtreecommitdiffstats
path: root/models/migrations/v111.go
diff options
context:
space:
mode:
authorMarge Bouvier <7380756+MarcelHillmann@users.noreply.github.com>2019-12-21 11:12:39 +0100
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-12-21 11:12:39 +0100
commit8149ed70405224250256757ba39e4d84674e5937 (patch)
treeb2ff24b9b8f11ea6415e256619ee2952312c9b99 /models/migrations/v111.go
parent4f42e03a3504e326b4f61969b796e8548598c49d (diff)
downloadgitea-8149ed70405224250256757ba39e4d84674e5937.tar.gz
gitea-8149ed70405224250256757ba39e4d84674e5937.zip
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>
Diffstat (limited to 'models/migrations/v111.go')
-rw-r--r--models/migrations/v111.go3
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
}