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
a96063b8
Commit
a96063b8
authored
Nov 15, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove indexes for FK (EE)
parent
b4bcbbdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
ee/db/migrate/20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
...20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
+14
-1
No files found.
ee/db/migrate/20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
View file @
a96063b8
...
...
@@ -21,6 +21,19 @@ class AddMissingIndexesForForeignKeysEE < ActiveRecord::Migration
end
def
down
# no-op
# MySQL requires index for FK,
# thus removal of indexes does fail
return
if
Gitlab
::
Database
.
mysql?
remove_concurrent_index
(
:application_settings
,
:file_template_project_id
)
remove_concurrent_index
(
:application_settings
,
:custom_project_templates_group_id
)
remove_concurrent_index
(
:board_assignees
,
:assignee_id
)
remove_concurrent_index
(
:board_labels
,
:label_id
)
remove_concurrent_index
(
:ci_pipeline_chat_data
,
:chat_name_id
)
remove_concurrent_index
(
:geo_node_namespace_links
,
:namespace_id
)
remove_concurrent_index
(
:namespaces
,
:file_template_project_id
)
remove_concurrent_index
(
:protected_branch_merge_access_levels
,
:group_id
)
remove_concurrent_index
(
:protected_branch_push_access_levels
,
:group_id
)
remove_concurrent_index
(
:software_license_policies
,
:software_license_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