Commit 4098fffe authored by Tiger Watson's avatar Tiger Watson

Merge branch 'remove-tmp-emails-index' into 'master'

Remove TMP index in emails table

See merge request gitlab-org/gitlab!50981
parents da79bc6f 79bb5ee8
---
title: Remove tmp_index_for_email_unconfirmation_migration index in the emails table
merge_request: 50981
author:
type: other
# frozen_string_literal: true
class DropTmpIndexOnEmails < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
EMAIL_INDEX_NAME = 'tmp_index_for_email_unconfirmation_migration'
disable_ddl_transaction!
def up
Gitlab::BackgroundMigration.steal('WrongfullyConfirmedEmailUnconfirmer')
remove_concurrent_index_by_name(:emails, EMAIL_INDEX_NAME)
end
def down
add_concurrent_index(:emails, :id, where: 'confirmed_at IS NOT NULL', name: EMAIL_INDEX_NAME)
end
end
71e005116082a59e40194fe5f9a500e31d67a011500d12aeecd59cb64d611848
\ 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_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);
CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (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