Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
64d84ebd
Commit
64d84ebd
authored
Nov 27, 2019
by
Markus Koller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra index on snippets.project_id
Fixes
https://gitlab.com/gitlab-org/gitlab/issues/37361
parent
afadba04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
db/migrate/20191014132931_remove_index_on_snippets_project_id.rb
...ate/20191014132931_remove_index_on_snippets_project_id.rb
+5
-2
No files found.
db/migrate/20191014132931_remove_index_on_snippets_project_id.rb
View file @
64d84ebd
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment