blob: 834e11e3d6e51511222b535952491d5e734a74ee (
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 AddIndexToContainerScanningFindings < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'idx_container_scanning_findings'
disable_ddl_transaction!
def up
add_concurrent_index(:vulnerability_occurrences, :id,
where: "report_type = 2",
name: INDEX_NAME)
end
def down
remove_concurrent_index_by_name(:project_registry, INDEX_NAME)
end
end
|