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
Boxiang Sun
gitlab-ce
Commits
c09fd53e
Commit
c09fd53e
authored
Nov 26, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove notes index on updated_at
parent
890addcb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
changelogs/unreleased/53988-remove-notes-index-on-updated-at.yml
...ogs/unreleased/53988-remove-notes-index-on-updated-at.yml
+5
-0
db/migrate/20181126153547_remove_notes_index_on_updated_at.rb
...igrate/20181126153547_remove_notes_index_on_updated_at.rb
+32
-0
db/schema.rb
db/schema.rb
+1
-2
No files found.
changelogs/unreleased/53988-remove-notes-index-on-updated-at.yml
0 → 100644
View file @
c09fd53e
---
title
:
Remove index for notes on updated_at
merge_request
:
23356
author
:
type
:
performance
db/migrate/20181126153547_remove_notes_index_on_updated_at.rb
0 → 100644
View file @
c09fd53e
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
RemoveNotesIndexOnUpdatedAt
<
ActiveRecord
::
Migration
[
5.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index
(
*
index_arguments
)
end
def
down
add_concurrent_index
(
*
index_arguments
)
end
private
def
index_arguments
[
:notes
,
[
:updated_at
],
{
name:
'index_notes_on_updated_at'
}
]
end
end
db/schema.rb
View file @
c09fd53e
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2018112615
0622
)
do
ActiveRecord
::
Schema
.
define
(
version:
2018112615
3547
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -1392,7 +1392,6 @@ ActiveRecord::Schema.define(version: 20181126150622) do
t
.
index
[
"noteable_id"
,
"noteable_type"
],
name:
"index_notes_on_noteable_id_and_noteable_type"
,
using: :btree
t
.
index
[
"noteable_type"
],
name:
"index_notes_on_noteable_type"
,
using: :btree
t
.
index
[
"project_id"
,
"noteable_type"
],
name:
"index_notes_on_project_id_and_noteable_type"
,
using: :btree
t
.
index
[
"updated_at"
],
name:
"index_notes_on_updated_at"
,
using: :btree
end
create_table
"notification_settings"
,
force: :cascade
do
|
t
|
...
...
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