Commit 97fae8b7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Only migrate and backfill protected flag on gitlab.com

parent 272d2081
...@@ -6,6 +6,8 @@ class MigrateProtectedAttributeToPendingBuilds < ActiveRecord::Migration[6.1] ...@@ -6,6 +6,8 @@ class MigrateProtectedAttributeToPendingBuilds < ActiveRecord::Migration[6.1]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
return unless Gitlab.dev_or_test_env? || Gitlab.com?
each_batch_range('ci_pending_builds', of: 1000) do |min, max| each_batch_range('ci_pending_builds', of: 1000) do |min, max|
execute <<~SQL execute <<~SQL
UPDATE ci_pending_builds UPDATE ci_pending_builds
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment