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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
5f8abe47
Commit
5f8abe47
authored
Mar 20, 2018
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flip column order in new index.
parent
c0bfe9db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb
...e/20180320182229_add_indexes_for_user_activity_queries.rb
+2
-2
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb
View file @
5f8abe47
...
@@ -6,12 +6,12 @@ class AddIndexesForUserActivityQueries < ActiveRecord::Migration
...
@@ -6,12 +6,12 @@ class AddIndexesForUserActivityQueries < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
up
def
up
add_concurrent_index
:events
,
[
:
project_id
,
:author
_id
]
add_concurrent_index
:events
,
[
:
author_id
,
:project
_id
]
add_concurrent_index
:user_interacted_projects
,
:user_id
add_concurrent_index
:user_interacted_projects
,
:user_id
end
end
def
down
def
down
remove_concurrent_index
:events
,
[
:
project_id
,
:author
_id
]
remove_concurrent_index
:events
,
[
:
author_id
,
:project
_id
]
patch_foreign_keys
do
patch_foreign_keys
do
remove_concurrent_index
:user_interacted_projects
,
:user_id
remove_concurrent_index
:user_interacted_projects
,
:user_id
...
...
db/schema.rb
View file @
5f8abe47
...
@@ -727,8 +727,8 @@ ActiveRecord::Schema.define(version: 20180320182229) do
...
@@ -727,8 +727,8 @@ ActiveRecord::Schema.define(version: 20180320182229) do
end
end
add_index
"events"
,
[
"action"
],
name:
"index_events_on_action"
,
using: :btree
add_index
"events"
,
[
"action"
],
name:
"index_events_on_action"
,
using: :btree
add_index
"events"
,
[
"author_id"
,
"project_id"
],
name:
"index_events_on_author_id_and_project_id"
,
using: :btree
add_index
"events"
,
[
"author_id"
],
name:
"index_events_on_author_id"
,
using: :btree
add_index
"events"
,
[
"author_id"
],
name:
"index_events_on_author_id"
,
using: :btree
add_index
"events"
,
[
"project_id"
,
"author_id"
],
name:
"index_events_on_project_id_and_author_id"
,
using: :btree
add_index
"events"
,
[
"project_id"
,
"id"
],
name:
"index_events_on_project_id_and_id"
,
using: :btree
add_index
"events"
,
[
"project_id"
,
"id"
],
name:
"index_events_on_project_id_and_id"
,
using: :btree
add_index
"events"
,
[
"target_type"
,
"target_id"
],
name:
"index_events_on_target_type_and_target_id"
,
using: :btree
add_index
"events"
,
[
"target_type"
,
"target_id"
],
name:
"index_events_on_target_type_and_target_id"
,
using: :btree
...
...
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