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
22d6f96c
Commit
22d6f96c
authored
Feb 16, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index for ci_commits for gl_project_id, ref, status
and remove the old one which we don't really need.
parent
3750b06b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
20170216135621_add_index_for_latest_successful_pipeline.rb
...0170216135621_add_index_for_latest_successful_pipeline.rb
+10
-0
20170216141440_drop_index_for_builds_project_status.rb
...te/20170216141440_drop_index_for_builds_project_status.rb
+8
-0
schema.rb
db/schema.rb
+2
-2
No files found.
db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb
0 → 100644
View file @
22d6f96c
class
AddIndexForLatestSuccessfulPipeline
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
change
add_concurrent_index
(
:ci_commits
,
[
:gl_project_id
,
:ref
,
:status
])
end
end
db/migrate/20170216141440_drop_index_for_builds_project_status.rb
0 → 100644
View file @
22d6f96c
class
DropIndexForBuildsProjectStatus
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
remove_index
(
:ci_commits
,
[
:gl_project_id
,
:status
])
end
end
db/schema.rb
View file @
22d6f96c
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017021
5200045
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017021
6141440
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -251,8 +251,8 @@ ActiveRecord::Schema.define(version: 20170215200045) do
t
.
integer
"lock_version"
end
add_index
"ci_commits"
,
[
"gl_project_id"
,
"ref"
,
"status"
],
name:
"index_ci_commits_on_gl_project_id_and_ref_and_status"
,
using: :btree
add_index
"ci_commits"
,
[
"gl_project_id"
,
"sha"
],
name:
"index_ci_commits_on_gl_project_id_and_sha"
,
using: :btree
add_index
"ci_commits"
,
[
"gl_project_id"
,
"status"
],
name:
"index_ci_commits_on_gl_project_id_and_status"
,
using: :btree
add_index
"ci_commits"
,
[
"gl_project_id"
],
name:
"index_ci_commits_on_gl_project_id"
,
using: :btree
add_index
"ci_commits"
,
[
"status"
],
name:
"index_ci_commits_on_status"
,
using: :btree
add_index
"ci_commits"
,
[
"user_id"
],
name:
"index_ci_commits_on_user_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