blob: 95abac4b7acb255bf87a5405b254e7610432f303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# frozen_string_literal: true
class DropTemporaryIndexForBackfillIntegrationsEnableSslVerification < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'tmp_index_integrations_on_id_where_type_droneci_or_teamcity'
INDEX_CONDITION = "type_new IN ('Integrations::DroneCi', 'Integrations::Teamcity') " \
"AND encrypted_properties IS NOT NULL"
def up
remove_concurrent_index_by_name :integrations, INDEX_NAME
end
def down
# this index is used in 20220209121435_backfill_integrations_enable_ssl_verification
add_concurrent_index :integrations, :id, where: INDEX_CONDITION, name: INDEX_NAME
end
end
|