blob: 25923bf00f6f973057525bd28aece0a85922890d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
class AddIndexToErrorTrackingClientKeys < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_error_tracking_client_for_enabled_check'
def up
add_concurrent_index(
:error_tracking_client_keys,
[:project_id, :public_key],
where: 'active = true',
name: INDEX_NAME
)
end
def down
remove_concurrent_index_by_name(:error_tracking_client_keys, INDEX_NAME)
end
end
|