Commit 7e8865de authored by Yannis Roussos's avatar Yannis Roussos

Merge branch '233387-remove-lc-temp-index' into 'master'

Remove temp index on job artifacts

See merge request gitlab-org/gitlab!45565
parents 3dcc22a2 a33f3a41
---
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
...@@ -20058,8 +20058,6 @@ CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btre ...@@ -20058,8 +20058,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 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 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])); 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