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
eea87fee
Commit
eea87fee
authored
Sep 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
aa5253c7
8e6ff655
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
changelogs/unreleased/ab-unconfirmed-email-index.yml
changelogs/unreleased/ab-unconfirmed-email-index.yml
+5
-0
db/migrate/20190904173203_add_index_on_users_unconfirmed_email.rb
...te/20190904173203_add_index_on_users_unconfirmed_email.rb
+17
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
changelogs/unreleased/ab-unconfirmed-email-index.yml
0 → 100644
View file @
eea87fee
---
title
:
Create index for users.unconfirmed_email
merge_request
:
32664
author
:
type
:
performance
db/migrate/20190904173203_add_index_on_users_unconfirmed_email.rb
0 → 100644
View file @
eea87fee
# frozen_string_literal: true
class
AddIndexOnUsersUnconfirmedEmail
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:users
,
:unconfirmed_email
,
where:
'unconfirmed_email IS NOT NULL'
end
def
down
remove_concurrent_index
:users
,
:unconfirmed_email
,
where:
'unconfirmed_email IS NOT NULL'
end
end
db/schema.rb
View file @
eea87fee
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2019_09_0
2_160015
)
do
ActiveRecord
::
Schema
.
define
(
version:
2019_09_0
4_173203
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"pg_trgm"
enable_extension
"pg_trgm"
...
@@ -3563,6 +3563,7 @@ ActiveRecord::Schema.define(version: 2019_09_02_160015) do
...
@@ -3563,6 +3563,7 @@ ActiveRecord::Schema.define(version: 2019_09_02_160015) do
t
.
index
[
"state"
],
name:
"index_users_on_state"
t
.
index
[
"state"
],
name:
"index_users_on_state"
t
.
index
[
"state"
],
name:
"index_users_on_state_and_internal"
,
where:
"(ghost IS NOT TRUE)"
t
.
index
[
"state"
],
name:
"index_users_on_state_and_internal"
,
where:
"(ghost IS NOT TRUE)"
t
.
index
[
"state"
],
name:
"index_users_on_state_and_internal_ee"
,
where:
"((ghost IS NOT TRUE) AND (bot_type IS NULL))"
t
.
index
[
"state"
],
name:
"index_users_on_state_and_internal_ee"
,
where:
"((ghost IS NOT TRUE) AND (bot_type IS NULL))"
t
.
index
[
"unconfirmed_email"
],
name:
"index_users_on_unconfirmed_email"
,
where:
"(unconfirmed_email IS NOT NULL)"
t
.
index
[
"username"
],
name:
"index_users_on_username"
t
.
index
[
"username"
],
name:
"index_users_on_username"
t
.
index
[
"username"
],
name:
"index_users_on_username_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
t
.
index
[
"username"
],
name:
"index_users_on_username_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
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