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
af4d5458
Commit
af4d5458
authored
Mar 16, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an index on ci_runners.token
On PostgreSQL the index is created concurrently. Fixes gitlab-org/gitlab-ce#14325
parent
a34021cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
20160316123110_ci_runners_token_index.rb
db/migrate/20160316123110_ci_runners_token_index.rb
+13
-0
schema.rb
db/schema.rb
+5
-4
No files found.
db/migrate/20160316123110_ci_runners_token_index.rb
0 → 100644
View file @
af4d5458
class
CiRunnersTokenIndex
<
ActiveRecord
::
Migration
disable_ddl_transaction!
def
change
args
=
[
:ci_runners
,
:token
]
if
Gitlab
::
Database
.
postgresql?
args
<<
{
algorithm: :concurrently
}
end
add_index
(
*
args
)
end
end
db/schema.rb
View file @
af4d5458
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2016031
4143402
)
do
ActiveRecord
::
Schema
.
define
(
version:
2016031
6123110
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -260,6 +260,7 @@ ActiveRecord::Schema.define(version: 20160314143402) do
end
add_index
"ci_runners"
,
[
"description"
],
name:
"index_ci_runners_on_description_trigram"
,
using: :gin
,
opclasses:
{
"description"
=>
"gin_trgm_ops"
}
add_index
"ci_runners"
,
[
"token"
],
name:
"index_ci_runners_on_token"
,
using: :btree
add_index
"ci_runners"
,
[
"token"
],
name:
"index_ci_runners_on_token_trigram"
,
using: :gin
,
opclasses:
{
"token"
=>
"gin_trgm_ops"
}
create_table
"ci_services"
,
force: :cascade
do
|
t
|
...
...
@@ -775,9 +776,9 @@ ActiveRecord::Schema.define(version: 20160314143402) do
t
.
string
"type"
t
.
string
"title"
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
boolean
"active"
,
default:
false
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
boolean
"active"
,
null:
false
t
.
text
"properties"
t
.
boolean
"template"
,
default:
false
t
.
boolean
"push_events"
,
default:
true
...
...
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