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
Boxiang Sun
gitlab-ce
Commits
c4bcb3a9
Commit
c4bcb3a9
authored
Sep 27, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index to speed up loading projects from DeployToken
parent
961d43a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
...410_add_index_to_project_deploy_tokens_deploy_token_id.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
0 → 100644
View file @
c4bcb3a9
# frozen_string_literal: true
class
AddIndexToProjectDeployTokensDeployTokenId
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:project_deploy_tokens
,
:deploy_token_id
end
def
down
remove_concurrent_index
(
:project_deploy_tokens
,
:deploy_token_id
)
if
Gitlab
::
Database
.
postgresql?
end
end
db/schema.rb
View file @
c4bcb3a9
...
...
@@ -1588,6 +1588,7 @@ ActiveRecord::Schema.define(version: 20181101144347) do
t
.
datetime_with_timezone
"created_at"
,
null:
false
end
add_index
"project_deploy_tokens"
,
[
"deploy_token_id"
],
name:
"index_project_deploy_tokens_on_deploy_token_id"
,
using: :btree
add_index
"project_deploy_tokens"
,
[
"project_id"
,
"deploy_token_id"
],
name:
"index_project_deploy_tokens_on_project_id_and_deploy_token_id"
,
unique:
true
,
using: :btree
create_table
"project_features"
,
force: :cascade
do
|
t
|
...
...
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