Commit a6f7c67c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Index protected pending builds only partially

parent 417d9614
......@@ -3,12 +3,12 @@
class AddIndexToProtectedPendingBuilds < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
INDEX_NAME = 'index_ci_pending_builds_on_protected'
INDEX_NAME = 'index_ci_pending_builds_id_on_protected_partial'
disable_ddl_transaction!
def up
add_concurrent_index :ci_pending_builds, :protected, name: INDEX_NAME
add_concurrent_index :ci_pending_builds, :id, where: 'protected = true', name: INDEX_NAME
end
def down
......
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