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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
64e24d64
Commit
64e24d64
authored
Jul 19, 2019
by
Etienne Baqué
Committed by
Stan Hu
Aug 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new index to deploy_tokens table
parent
84d6dcbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
db/migrate/20190719174505_add_index_to_deploy_tokens_token_encrypted.rb
...90719174505_add_index_to_deploy_tokens_token_encrypted.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20190719174505_add_index_to_deploy_tokens_token_encrypted.rb
0 → 100644
View file @
64e24d64
# frozen_string_literal: true
class
AddIndexToDeployTokensTokenEncrypted
<
ActiveRecord
::
Migration
[
5.1
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:deploy_tokens
,
:token_encrypted
,
unique:
true
,
name:
"index_deploy_tokens_on_token_encrypted"
end
def
down
remove_concurrent_index_by_name
:deploy_tokens
,
"index_deploy_tokens_on_token_encrypted"
end
end
db/schema.rb
View file @
64e24d64
...
...
@@ -1126,6 +1126,7 @@ ActiveRecord::Schema.define(version: 2019_08_20_163320) do
t
.
string
"token_encrypted"
t
.
index
[
"token"
,
"expires_at"
,
"id"
],
name:
"index_deploy_tokens_on_token_and_expires_at_and_id"
,
where:
"(revoked IS FALSE)"
t
.
index
[
"token"
],
name:
"index_deploy_tokens_on_token"
,
unique:
true
t
.
index
[
"token_encrypted"
],
name:
"index_deploy_tokens_on_token_encrypted"
,
unique:
true
end
create_table
"deployments"
,
id: :serial
,
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