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
27f5297f
Commit
27f5297f
authored
Mar 18, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add correct index
parent
b3bda708
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
db/migrate/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb
...te/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb
+2
-2
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb
View file @
27f5297f
...
@@ -9,10 +9,10 @@ class AddIndexOnIdAndLdapKeyToKeys < ActiveRecord::Migration[6.0]
...
@@ -9,10 +9,10 @@ class AddIndexOnIdAndLdapKeyToKeys < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
disable_ddl_transaction!
def
up
def
up
add_concurrent_index
:keys
,
[
:id
,
:type
],
where:
"type = 'LDAPKey'"
,
name:
INDEX_NAME
add_concurrent_index
:keys
,
[
:id
],
where:
"type = 'LDAPKey'"
,
name:
INDEX_NAME
end
end
def
down
def
down
remove_concurrent_index
:keys
,
INDEX_NAME
remove_concurrent_index
_by_name
:keys
,
INDEX_NAME
end
end
end
end
db/schema.rb
View file @
27f5297f
...
@@ -2309,8 +2309,8 @@ ActiveRecord::Schema.define(version: 2020_03_16_111759) do
...
@@ -2309,8 +2309,8 @@ ActiveRecord::Schema.define(version: 2020_03_16_111759) do
t
.
datetime_with_timezone
"expires_at"
t
.
datetime_with_timezone
"expires_at"
t
.
index
[
"fingerprint"
],
name:
"index_keys_on_fingerprint"
,
unique:
true
t
.
index
[
"fingerprint"
],
name:
"index_keys_on_fingerprint"
,
unique:
true
t
.
index
[
"fingerprint_sha256"
],
name:
"index_keys_on_fingerprint_sha256"
t
.
index
[
"fingerprint_sha256"
],
name:
"index_keys_on_fingerprint_sha256"
t
.
index
[
"id"
,
"type"
],
name:
"index_keys_on_id_and_ldap_key_type"
,
where:
"((type)::text = 'LDAPKey'::text)"
t
.
index
[
"id"
,
"type"
],
name:
"index_on_deploy_keys_id_and_type_and_public"
,
unique:
true
,
where:
"(public = true)"
t
.
index
[
"id"
,
"type"
],
name:
"index_on_deploy_keys_id_and_type_and_public"
,
unique:
true
,
where:
"(public = true)"
t
.
index
[
"id"
],
name:
"index_keys_on_id_and_ldap_key_type"
,
where:
"((type)::text = 'LDAPKey'::text)"
t
.
index
[
"last_used_at"
],
name:
"index_keys_on_last_used_at"
,
order:
"DESC NULLS LAST"
t
.
index
[
"last_used_at"
],
name:
"index_keys_on_last_used_at"
,
order:
"DESC NULLS LAST"
t
.
index
[
"user_id"
],
name:
"index_keys_on_user_id"
t
.
index
[
"user_id"
],
name:
"index_keys_on_user_id"
end
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