BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3d5526a0
Commit
3d5526a0
authored
Jun 21, 2017
by
Yorick Peterse
Committed by
kushalpandya
Jun 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'add-index-for-head-pipeline-id' into 'master'
Add index for head pipeline See merge request !12273
parent
54276d39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
20170619144837_add_index_for_head_pipeline_merge_request.rb
...170619144837_add_index_for_head_pipeline_merge_request.rb
+15
-0
schema.rb
db/schema.rb
+3
-1
No files found.
db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb
0 → 100644
View file @
3d5526a0
class
AddIndexForHeadPipelineMergeRequest
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:merge_requests
,
:head_pipeline_id
end
def
down
remove_concurrent_index
:merge_requests
,
:head_pipeline_id
if
index_exists?
(
:merge_requests
,
:head_pipeline_id
)
end
end
db/schema.rb
View file @
3d5526a0
...
...
@@ -11,7 +11,8 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20170606202615
)
do
ActiveRecord
::
Schema
.
define
(
version:
20170619144837
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"pg_trgm"
...
...
@@ -760,6 +761,7 @@ ActiveRecord::Schema.define(version: 20170606202615) do
add_index
"merge_requests"
,
[
"created_at"
],
name:
"index_merge_requests_on_created_at"
,
using: :btree
add_index
"merge_requests"
,
[
"deleted_at"
],
name:
"index_merge_requests_on_deleted_at"
,
using: :btree
add_index
"merge_requests"
,
[
"description"
],
name:
"index_merge_requests_on_description_trigram"
,
using: :gin
,
opclasses:
{
"description"
=>
"gin_trgm_ops"
}
add_index
"merge_requests"
,
[
"head_pipeline_id"
],
name:
"index_merge_requests_on_head_pipeline_id"
,
using: :btree
add_index
"merge_requests"
,
[
"milestone_id"
],
name:
"index_merge_requests_on_milestone_id"
,
using: :btree
add_index
"merge_requests"
,
[
"source_branch"
],
name:
"index_merge_requests_on_source_branch"
,
using: :btree
add_index
"merge_requests"
,
[
"source_project_id"
],
name:
"index_merge_requests_on_source_project_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