summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-28 09:06:32 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-28 09:06:32 +0000
commit79348faced5e7e62103ad27f6a6594dfdca463e2 (patch)
tree385756f26c6d0b57c0c9e841b83784ff86634d5b /db
parent45a05a8ba33101ffcd154ee84307885b48b17962 (diff)
downloadgitlab-ce-79348faced5e7e62103ad27f6a6594dfdca463e2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191014132931_remove_index_on_snippets_project_id.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/db/migrate/20191014132931_remove_index_on_snippets_project_id.rb b/db/migrate/20191014132931_remove_index_on_snippets_project_id.rb
index a1d3ffdb8c8..850112b4f0b 100644
--- a/db/migrate/20191014132931_remove_index_on_snippets_project_id.rb
+++ b/db/migrate/20191014132931_remove_index_on_snippets_project_id.rb
@@ -8,10 +8,13 @@ class RemoveIndexOnSnippetsProjectId < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
- remove_concurrent_index :snippets, [:project_id]
+ remove_concurrent_index_by_name :snippets, 'index_snippets_on_project_id'
+
+ # This is an extra index that is not present in db/schema.rb but known to exist on some installs
+ remove_concurrent_index_by_name :snippets, :snippets_project_id_idx if index_exists_by_name? :snippets, :snippets_project_id_idx
end
def down
- add_concurrent_index :snippets, [:project_id]
+ add_concurrent_index :snippets, [:project_id], name: 'index_snippets_on_project_id'
end
end