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
9b57b4bb
Commit
9b57b4bb
authored
Mar 21, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'perf/add-index-to-user-ghost' into 'master'
add an index to the ghost column See merge request !9910
parents
b9d4d535
2de768e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
db/migrate/20170313213916_add_index_to_user_ghost.rb
db/migrate/20170313213916_add_index_to_user_ghost.rb
+24
-0
db/schema.rb
db/schema.rb
+4
-3
No files found.
db/migrate/20170313213916_add_index_to_user_ghost.rb
0 → 100644
View file @
9b57b4bb
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddIndexToUserGhost
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# migration requires downtime.
# DOWNTIME_REASON = ''
disable_ddl_transaction!
def
up
add_concurrent_index
:users
,
:ghost
end
def
down
remove_index
:users
,
:ghost
end
end
db/schema.rb
View file @
9b57b4bb
...
@@ -61,7 +61,6 @@ ActiveRecord::Schema.define(version: 20170315194013) do
...
@@ -61,7 +61,6 @@ ActiveRecord::Schema.define(version: 20170315194013) do
t
.
boolean
"shared_runners_enabled"
,
default:
true
,
null:
false
t
.
boolean
"shared_runners_enabled"
,
default:
true
,
null:
false
t
.
integer
"max_artifacts_size"
,
default:
100
,
null:
false
t
.
integer
"max_artifacts_size"
,
default:
100
,
null:
false
t
.
string
"runners_registration_token"
t
.
string
"runners_registration_token"
t
.
integer
"max_pages_size"
,
default:
100
,
null:
false
t
.
boolean
"require_two_factor_authentication"
,
default:
false
t
.
boolean
"require_two_factor_authentication"
,
default:
false
t
.
integer
"two_factor_grace_period"
,
default:
48
t
.
integer
"two_factor_grace_period"
,
default:
48
t
.
boolean
"metrics_enabled"
,
default:
false
t
.
boolean
"metrics_enabled"
,
default:
false
...
@@ -111,6 +110,7 @@ ActiveRecord::Schema.define(version: 20170315194013) do
...
@@ -111,6 +110,7 @@ ActiveRecord::Schema.define(version: 20170315194013) do
t
.
string
"plantuml_url"
t
.
string
"plantuml_url"
t
.
boolean
"plantuml_enabled"
t
.
boolean
"plantuml_enabled"
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
t
.
integer
"max_pages_size"
,
default:
100
,
null:
false
t
.
string
"default_artifacts_expire_in"
,
default:
"0"
,
null:
false
t
.
string
"default_artifacts_expire_in"
,
default:
"0"
,
null:
false
t
.
integer
"unique_ips_limit_per_user"
t
.
integer
"unique_ips_limit_per_user"
t
.
integer
"unique_ips_limit_time_window"
t
.
integer
"unique_ips_limit_time_window"
...
@@ -688,8 +688,8 @@ ActiveRecord::Schema.define(version: 20170315194013) do
...
@@ -688,8 +688,8 @@ ActiveRecord::Schema.define(version: 20170315194013) do
t
.
integer
"visibility_level"
,
default:
20
,
null:
false
t
.
integer
"visibility_level"
,
default:
20
,
null:
false
t
.
boolean
"request_access_enabled"
,
default:
false
,
null:
false
t
.
boolean
"request_access_enabled"
,
default:
false
,
null:
false
t
.
datetime
"deleted_at"
t
.
datetime
"deleted_at"
t
.
text
"description_html"
t
.
boolean
"lfs_enabled"
t
.
boolean
"lfs_enabled"
t
.
text
"description_html"
t
.
integer
"parent_id"
t
.
integer
"parent_id"
end
end
...
@@ -1231,8 +1231,8 @@ ActiveRecord::Schema.define(version: 20170315194013) do
...
@@ -1231,8 +1231,8 @@ ActiveRecord::Schema.define(version: 20170315194013) do
t
.
datetime
"otp_grace_period_started_at"
t
.
datetime
"otp_grace_period_started_at"
t
.
boolean
"ldap_email"
,
default:
false
,
null:
false
t
.
boolean
"ldap_email"
,
default:
false
,
null:
false
t
.
boolean
"external"
,
default:
false
t
.
boolean
"external"
,
default:
false
t
.
string
"incoming_email_token"
t
.
string
"organization"
t
.
string
"organization"
t
.
string
"incoming_email_token"
t
.
boolean
"authorized_projects_populated"
t
.
boolean
"authorized_projects_populated"
t
.
boolean
"ghost"
t
.
boolean
"ghost"
end
end
...
@@ -1244,6 +1244,7 @@ ActiveRecord::Schema.define(version: 20170315194013) do
...
@@ -1244,6 +1244,7 @@ ActiveRecord::Schema.define(version: 20170315194013) do
add_index
"users"
,
[
"current_sign_in_at"
],
name:
"index_users_on_current_sign_in_at"
,
using: :btree
add_index
"users"
,
[
"current_sign_in_at"
],
name:
"index_users_on_current_sign_in_at"
,
using: :btree
add_index
"users"
,
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"email"
],
name:
"index_users_on_email_trigram"
,
using: :gin
,
opclasses:
{
"email"
=>
"gin_trgm_ops"
}
add_index
"users"
,
[
"email"
],
name:
"index_users_on_email_trigram"
,
using: :gin
,
opclasses:
{
"email"
=>
"gin_trgm_ops"
}
add_index
"users"
,
[
"ghost"
],
name:
"index_users_on_ghost"
,
using: :btree
add_index
"users"
,
[
"incoming_email_token"
],
name:
"index_users_on_incoming_email_token"
,
using: :btree
add_index
"users"
,
[
"incoming_email_token"
],
name:
"index_users_on_incoming_email_token"
,
using: :btree
add_index
"users"
,
[
"name"
],
name:
"index_users_on_name"
,
using: :btree
add_index
"users"
,
[
"name"
],
name:
"index_users_on_name"
,
using: :btree
add_index
"users"
,
[
"name"
],
name:
"index_users_on_name_trigram"
,
using: :gin
,
opclasses:
{
"name"
=>
"gin_trgm_ops"
}
add_index
"users"
,
[
"name"
],
name:
"index_users_on_name_trigram"
,
using: :gin
,
opclasses:
{
"name"
=>
"gin_trgm_ops"
}
...
...
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