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
97fbc2e5
Commit
97fbc2e5
authored
Sep 19, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index on pipelines to project id and source
parent
53e012a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
...e/20180916011959_add_index_pipelines_project_id_source.rb
+20
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
0 → 100644
View file @
97fbc2e5
# 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
AddIndexPipelinesProjectIdSource
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_pipelines
,
[
:project_id
,
:source
]
end
def
down
remove_concurrent_index
:ci_pipelines
,
[
:project_id
,
:source
]
end
end
db/schema.rb
View file @
97fbc2e5
...
...
@@ -475,6 +475,7 @@ ActiveRecord::Schema.define(version: 20180917172041) do
add_index
"ci_pipelines"
,
[
"project_id"
,
"iid"
],
name:
"index_ci_pipelines_on_project_id_and_iid"
,
unique:
true
,
where:
"(iid IS NOT NULL)"
,
using: :btree
add_index
"ci_pipelines"
,
[
"project_id"
,
"ref"
,
"status"
,
"id"
],
name:
"index_ci_pipelines_on_project_id_and_ref_and_status_and_id"
,
using: :btree
add_index
"ci_pipelines"
,
[
"project_id"
,
"sha"
],
name:
"index_ci_pipelines_on_project_id_and_sha"
,
using: :btree
add_index
"ci_pipelines"
,
[
"project_id"
,
"source"
],
name:
"index_ci_pipelines_on_project_id_and_source"
,
using: :btree
add_index
"ci_pipelines"
,
[
"project_id"
,
"status"
,
"config_source"
],
name:
"index_ci_pipelines_on_project_id_and_status_and_config_source"
,
using: :btree
add_index
"ci_pipelines"
,
[
"project_id"
],
name:
"index_ci_pipelines_on_project_id"
,
using: :btree
add_index
"ci_pipelines"
,
[
"status"
],
name:
"index_ci_pipelines_on_status"
,
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