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
73f87244
Commit
73f87244
authored
Dec 05, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use partial NOT NULL index for token_encrypted field
parent
6de0eb03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
.../20181129104944_add_index_to_ci_builds_token_encrypted.rb
+1
-1
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
View file @
73f87244
...
...
@@ -8,7 +8,7 @@ class AddIndexToCiBuildsTokenEncrypted < ActiveRecord::Migration[5.0]
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_builds
,
:token_encrypted
,
unique:
true
add_concurrent_index
:ci_builds
,
:token_encrypted
,
unique:
true
,
where:
'token_encrypted IS NOT NULL'
end
def
down
...
...
db/schema.rb
View file @
73f87244
...
...
@@ -361,7 +361,7 @@ ActiveRecord::Schema.define(version: 20181129104944) do
t
.
index
[
"stage_id"
],
name:
"index_ci_builds_on_stage_id"
,
using: :btree
t
.
index
[
"status"
,
"type"
,
"runner_id"
],
name:
"index_ci_builds_on_status_and_type_and_runner_id"
,
using: :btree
t
.
index
[
"token"
],
name:
"index_ci_builds_on_token"
,
unique:
true
,
using: :btree
t
.
index
[
"token_encrypted"
],
name:
"index_ci_builds_on_token_encrypted"
,
unique:
true
,
using: :btree
t
.
index
[
"token_encrypted"
],
name:
"index_ci_builds_on_token_encrypted"
,
unique:
true
,
where:
"(token_encrypted IS NOT NULL)"
,
using: :btree
t
.
index
[
"updated_at"
],
name:
"index_ci_builds_on_updated_at"
,
using: :btree
t
.
index
[
"user_id"
],
name:
"index_ci_builds_on_user_id"
,
using: :btree
end
...
...
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