Commit a33f3a41 authored by Tetiana Chupryna's avatar Tetiana Chupryna Committed by Yannis Roussos

Remove temp index on job artifacts

We needed this index to run migration
20200809221641_migrate_license_management_artifacts_to_license_scanning
Since this migration is rolled up, we can remove the index
parent 2b8072a2
---
title: Remove temp index on job artifacts
merge_request: 45565
author:
type: changed
# frozen_string_literal: true
class RemoveLicenseComplianceTempIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_ci_job_artifacts_on_license_compliance_file_types'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME
end
def down
add_concurrent_index :ci_job_artifacts, [:job_id, :file_type], where: 'file_type = 10 OR file_type = 101', name: INDEX_NAME
end
end
fcd2cc46dae4f4da96ac5a2100a9de9bd360defee82a9c9d6cfbda0e1507ee66
\ No newline at end of file
......@@ -20030,8 +20030,6 @@ CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btre
CREATE UNIQUE INDEX index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_artifacts USING btree (job_id, file_type);
CREATE INDEX index_ci_job_artifacts_on_license_compliance_file_types ON ci_job_artifacts USING btree (job_id, file_type) WHERE ((file_type = 10) OR (file_type = 101));
CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id);
CREATE INDEX index_ci_job_artifacts_on_project_id_for_security_reports ON ci_job_artifacts USING btree (project_id) WHERE (file_type = ANY (ARRAY[5, 6, 7, 8]));
......
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