Commit 18b2c46c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'ab/drop-tmp-index-on-ci-builds' into 'master'

Drop temporary index on ci builds

See merge request gitlab-org/gitlab!50961
parents 45be2c38 22b06b23
---
title: Drop temporary index on ci_builds
merge_request: 50961
author:
type: other
# frozen_string_literal: true
class DropTemporaryIndexOnCiBuilds < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX = 'tmp_build_stage_position_index'.freeze
def up
remove_concurrent_index_by_name :ci_builds, INDEX
end
def down
add_concurrent_index :ci_builds, [:stage_id, :stage_idx], where: 'stage_idx IS NOT NULL', name: INDEX
end
end
d15dc3e57f050f037dd6b6b2b1efdafee49bf411580e35a7b4dbe14868c41e13
\ No newline at end of file
......@@ -23105,8 +23105,6 @@ CREATE INDEX temporary_index_vulnerabilities_on_id ON vulnerabilities USING btre
CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id);
CREATE INDEX tmp_build_stage_position_index ON ci_builds USING btree (stage_id, stage_idx) WHERE (stage_idx IS NOT NULL);
CREATE INDEX tmp_index_for_email_unconfirmation_migration ON emails USING btree (id) WHERE (confirmed_at IS NOT NULL);
CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2);
......
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