Commit b229106d authored by Tiger Watson's avatar Tiger Watson

Merge branch 'create-index-for-cs' into 'master'

Add temporary index for container scanning findings

See merge request gitlab-org/gitlab!39962
parents 1f84a0b2 2bc55f5e
---
title: Add temporary index for container scanning findings
merge_request: 39962
author:
type: other
# 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
e21ae06853e3a071669fa8e9ed2638f0e7854813bc5a1639b31ad6edb50f6427
\ No newline at end of file
......@@ -18909,6 +18909,8 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON public.epic_user_ment
CREATE INDEX idx_ci_pipelines_artifacts_locked ON public.ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1);
CREATE INDEX idx_container_scanning_findings ON public.vulnerability_occurrences USING btree (id) WHERE (report_type = 2);
CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON public.deployment_clusters USING btree (cluster_id, kubernetes_namespace);
CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON public.deployment_merge_requests USING btree (deployment_id, merge_request_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment