summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 10:28:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 10:28:37 +0000
commit662bb2b6f1f5b5730a0d1eaa66238e718468645d (patch)
treec1ca759e7d2c96e9c2023bbcf946f79e423473a5 /db
parented8af41027110fdad8f7bb4d53329eb73417fb8d (diff)
downloadgitlab-ce-662bb2b6f1f5b5730a0d1eaa66238e718468645d.tar.gz
Add latest changes from gitlab-org/gitlab@12-5-stable-ee
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