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
Léo-Paul Géneau
gitlab-ce
Commits
e780473d
Commit
e780473d
authored
Apr 25, 2017
by
blackst0ne
Committed by
Yorick Peterse
Apr 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index on ci_builds.user_id
parent
0eca206c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
changelogs/unreleased/add_index_on_ci_builds_user_id.yml
changelogs/unreleased/add_index_on_ci_builds_user_id.yml
+4
-0
db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
+19
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
changelogs/unreleased/add_index_on_ci_builds_user_id.yml
0 → 100644
View file @
e780473d
---
title
:
Add index on ci_builds.user_id
merge_request
:
10874
author
:
blackst0ne
db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
0 → 100644
View file @
e780473d
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddIndexOnCiBuildsUserId
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_builds
,
:user_id
end
def
down
remove_concurrent_index
:ci_builds
,
:user_id
if
index_exists?
(
:ci_builds
,
:user_id
)
end
end
db/schema.rb
View file @
e780473d
...
...
@@ -242,6 +242,7 @@ ActiveRecord::Schema.define(version: 20170424142900) do
add_index
"ci_builds"
,
[
"status"
],
name:
"index_ci_builds_on_status"
,
using: :btree
add_index
"ci_builds"
,
[
"token"
],
name:
"index_ci_builds_on_token"
,
unique:
true
,
using: :btree
add_index
"ci_builds"
,
[
"updated_at"
],
name:
"index_ci_builds_on_updated_at"
,
using: :btree
add_index
"ci_builds"
,
[
"user_id"
],
name:
"index_ci_builds_on_user_id"
,
using: :btree
create_table
"ci_pipelines"
,
force: :cascade
do
|
t
|
t
.
string
"ref"
...
...
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