Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
672df4ec
Commit
672df4ec
authored
7 years ago
by
takayamaki
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add index_notifications_on_id_and_account_id_and_activity_type on notifications table (#4750)
parent
aefb4719
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/migrate/20170905044538_add_index_id_account_id_activity_type_on_notifications.rb
+5
-0
5 additions, 0 deletions
...add_index_id_account_id_activity_type_on_notifications.rb
db/schema.rb
+2
-1
2 additions, 1 deletion
db/schema.rb
with
7 additions
and
1 deletion
db/migrate/20170905044538_add_index_id_account_id_activity_type_on_notifications.rb
0 → 100644
+
5
−
0
View file @
672df4ec
class
AddIndexIdAccountIdActivityTypeOnNotifications
<
ActiveRecord
::
Migration
[
5.1
]
def
change
add_index
:notifications
,
[
:id
,
:account_id
,
:activity_type
],
order:
{
id: :desc
}
end
end
This diff is collapsed.
Click to expand it.
db/schema.rb
+
2
−
1
View file @
672df4ec
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017090
114265
8
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017090
504453
8
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -180,6 +180,7 @@ ActiveRecord::Schema.define(version: 20170901142658) do
t
.
integer
"from_account_id"
t
.
index
[
"account_id"
,
"activity_id"
,
"activity_type"
],
name:
"account_activity"
,
unique:
true
t
.
index
[
"activity_id"
,
"activity_type"
],
name:
"index_notifications_on_activity_id_and_activity_type"
t
.
index
[
"id"
,
"account_id"
,
"activity_type"
],
name:
"index_notifications_on_id_and_account_id_and_activity_type"
,
order:
{
id: :desc
}
end
create_table
"oauth_access_grants"
,
id: :serial
,
force: :cascade
do
|
t
|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment