blob: 4c6f96a97c1cc0f2e073a47cccf8526b08aab84a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# frozen_string_literal: true
class DropTempIndexOnProtectedBranchPushAccessLevels < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '16.8'
INDEX_NAME = 'tmp_idx_protected_branch_push_access_levels_on_id_with_group'
def up
remove_concurrent_index_by_name(
:protected_branch_push_access_levels,
INDEX_NAME
)
end
def down
add_concurrent_index(
:protected_branch_push_access_levels,
%i[id],
where: 'group_id IS NOT NULL',
name: INDEX_NAME
)
end
end
|