Commit 0918c2ed authored by Yannis Roussos's avatar Yannis Roussos

Merge branch 'remove-unused-index-for-cs-reports' into 'master'

Remove unused index for container scanning reports

See merge request gitlab-org/gitlab!44131
parents 486b7154 c6753961
---
title: Remove temporary index for container scanning findings
merge_request: 44131
author:
type: other
# frozen_string_literal: true
class RemoveContainerScanningReportTypeIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'idx_container_scanning_findings'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME)
end
def down
# report_type: 2 container scanning
add_concurrent_index(
:vulnerability_occurrences,
:id,
where: 'report_type = 2',
name: INDEX_NAME
)
end
end
823c72852eeb17eaf43c58e936ac25effdacb335f76562c68a4f90d5b1a32021
\ No newline at end of file
...@@ -19465,8 +19465,6 @@ CREATE INDEX idx_audit_events_on_entity_id_desc_author_id_created_at ON audit_ev ...@@ -19465,8 +19465,6 @@ CREATE INDEX idx_audit_events_on_entity_id_desc_author_id_created_at ON audit_ev
CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1);
CREATE INDEX idx_container_scanning_findings ON vulnerability_occurrences USING btree (id) WHERE (report_type = 2);
CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace); CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace);
CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON deployment_merge_requests USING btree (deployment_id, merge_request_id); CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON 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