Commit b5218c89 authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'mc/backstage/remove-artifact-expiry-temp-index' into 'master'

Remove artifact expiry temp index

See merge request gitlab-org/gitlab!54252
parents 2b299cf2 4fa1e3fb
---
title: Remove artifact expiry backfill temp index.
merge_request: 54252
author:
type: changed
# frozen_string_literal: true
class RemoveArtifactExpiryTempIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
INDEX_NAME = 'expired_artifacts_temp_index'
INDEX_CONDITION = "expire_at IS NULL AND date(created_at AT TIME ZONE 'UTC') < '2020-06-22'::date"
def up
remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
end
def down
add_concurrent_index(:ci_job_artifacts, %i(id created_at), where: INDEX_CONDITION, name: INDEX_NAME)
end
end
f72f0a31bca545d2528030019695b03e0858d7ae9a0fb32d407c25580731fa6b
\ No newline at end of file
......@@ -21800,8 +21800,6 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON epic_user
CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL);
CREATE INDEX expired_artifacts_temp_index ON ci_job_artifacts USING btree (id, created_at) WHERE ((expire_at IS NULL) AND (date(timezone('UTC'::text, created_at)) < '2020-06-22'::date));
CREATE INDEX finding_evidence_requests_on_finding_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_id);
CREATE INDEX finding_evidence_responses_on_finding_evidences_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_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