Commit b1bd94cd authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'add-index-for-verification-reminder' into 'master'

Add specialized index for verification reminder

See merge request gitlab-org/gitlab!77108
parents 6af8e4d4 9c080adf
# frozen_string_literal: true
class AddIndexOnCiPipelinesUserIdIdFailureReason < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified'
def up
add_concurrent_index :ci_pipelines, [:user_id, :id], order: { id: :desc }, where: 'failure_reason = 3', name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :ci_pipelines, INDEX_NAME
end
end
157128732c321577b7fa7a1b3d252ff70a2a62b34cd1e6edea59da4e632a1755
\ No newline at end of file
......@@ -25567,6 +25567,8 @@ CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipel
CREATE INDEX index_ci_pipelines_on_user_id_and_id_and_cancelable_status ON ci_pipelines USING btree (user_id, id) WHERE ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('waiting_for_resource'::character varying)::text, ('preparing'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text, ('scheduled'::character varying)::text]));
CREATE INDEX index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified ON ci_pipelines USING btree (user_id, id DESC) WHERE (failure_reason = 3);
CREATE INDEX index_ci_project_mirrors_on_namespace_id ON ci_project_mirrors USING btree (namespace_id);
CREATE UNIQUE INDEX index_ci_project_mirrors_on_project_id ON ci_project_mirrors USING btree (project_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