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
2cf4570d
Commit
2cf4570d
authored
Oct 16, 2019
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace index on ci_triggers
Relates to
https://gitlab.com/gitlab-org/gitlab/issues/34188
parent
b480a089
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
changelogs/unreleased/ab-replace-index.yml
changelogs/unreleased/ab-replace-index.yml
+5
-0
db/migrate/20191016072826_replace_ci_trigger_requests_index.rb
...grate/20191016072826_replace_ci_trigger_requests_index.rb
+21
-0
db/schema.rb
db/schema.rb
+2
-2
No files found.
changelogs/unreleased/ab-replace-index.yml
0 → 100644
View file @
2cf4570d
---
title
:
Replace index on ci_triggers
merge_request
:
18652
author
:
type
:
performance
db/migrate/20191016072826_replace_ci_trigger_requests_index.rb
0 → 100644
View file @
2cf4570d
# frozen_string_literal: true
class
ReplaceCiTriggerRequestsIndex
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_trigger_requests
,
[
:trigger_id
,
:id
],
order:
{
id: :desc
}
remove_concurrent_index
:ci_trigger_requests
,
[
:trigger_id
]
end
def
down
add_concurrent_index
:ci_trigger_requests
,
[
:trigger_id
]
remove_concurrent_index
:ci_trigger_requests
,
[
:trigger_id
,
:id
],
order:
{
id: :desc
}
end
end
db/schema.rb
View file @
2cf4570d
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2019_10_
04_133612
)
do
ActiveRecord
::
Schema
.
define
(
version:
2019_10_
16_072826
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"pg_trgm"
...
...
@@ -906,7 +906,7 @@ ActiveRecord::Schema.define(version: 2019_10_04_133612) do
t
.
datetime
"updated_at"
t
.
integer
"commit_id"
t
.
index
[
"commit_id"
],
name:
"index_ci_trigger_requests_on_commit_id"
t
.
index
[
"trigger_id"
],
name:
"index_ci_trigger_requests_on_trigger_id"
t
.
index
[
"trigger_id"
,
"id"
],
name:
"index_ci_trigger_requests_on_trigger_id_and_id"
,
order:
{
id: :desc
}
end
create_table
"ci_triggers"
,
id: :serial
,
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