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
a759cff7
Commit
a759cff7
authored
Apr 24, 2017
by
Yorick Peterse
Committed by
Timothy Andrew
Apr 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'add_index_on_ci_builds_updated_at' into 'master'
Add index on ci_builds.updated_at Closes #31251 See merge request !10870
parent
6e659d8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
add_index_on_ci_builds_updated_at.yml
changelogs/unreleased/add_index_on_ci_builds_updated_at.yml
+4
-0
20170423064036_add_index_on_ci_builds_updated_at.rb
...grate/20170423064036_add_index_on_ci_builds_updated_at.rb
+19
-0
schema.rb
db/schema.rb
+2
-1
No files found.
changelogs/unreleased/add_index_on_ci_builds_updated_at.yml
0 → 100644
View file @
a759cff7
---
title
:
Add index on ci_builds.updated_at
merge_request
:
10870
author
:
blackst0ne
db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb
0 → 100644
View file @
a759cff7
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddIndexOnCiBuildsUpdatedAt
<
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
,
:updated_at
end
def
down
remove_concurrent_index
:ci_builds
,
:updated_at
if
index_exists?
(
:ci_builds
,
:updated_at
)
end
end
db/schema.rb
View file @
a759cff7
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201704
19001229
)
do
ActiveRecord
::
Schema
.
define
(
version:
201704
23064036
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -237,6 +237,7 @@ ActiveRecord::Schema.define(version: 20170419001229) do
add_index
"ci_builds"
,
[
"status"
,
"type"
,
"runner_id"
],
name:
"index_ci_builds_on_status_and_type_and_runner_id"
,
using: :btree
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
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