mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-20 14:11:11 +00:00
18 lines
448 B
Ruby
18 lines
448 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddVulnerabilitiesCreatedAtIndex < ActiveRecord::Migration[6.1]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
disable_ddl_transaction!
|
|
|
|
INDEX_NAME = 'idx_vulnerabilities_partial_devops_adoption'
|
|
|
|
def up
|
|
add_concurrent_index :vulnerabilities, [:project_id, :created_at], where: 'state != 1', name: INDEX_NAME
|
|
end
|
|
|
|
def down
|
|
remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME
|
|
end
|
|
end
|