Commit 57c38db8 authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'cat-duplicate-ci-pipelines-index-215790' into 'master'

Remove index by name on ci_pipelines

Closes #215790

See merge request gitlab-org/gitlab!31043
parents 271d4ee6 052738a1
---
title: Fix duplicate index removal on ci_pipelines.project_id
merge_request: 31043
author:
type: fixed
......@@ -8,10 +8,13 @@ class DropIndexCiPipelinesOnProjectId < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
remove_concurrent_index :ci_pipelines, :project_id
remove_concurrent_index_by_name :ci_pipelines, 'index_ci_pipelines_on_project_id'
# extra (duplicate) index that already existed on some installs
remove_concurrent_index_by_name :ci_pipelines, 'ci_pipelines_project_id_idx'
end
def down
add_concurrent_index :ci_pipelines, :project_id
add_concurrent_index :ci_pipelines, :project_id, name: 'index_ci_pipelines_on_project_id'
end
end
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