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
e3f88e68
Commit
e3f88e68
authored
Apr 04, 2017
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove index for users.current sign in at
parent
d9aca741
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
changelogs/unreleased/remove_index_for_users-current_sign_in_at.yml
.../unreleased/remove_index_for_users-current_sign_in_at.yml
+4
-0
db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
...170402231018_remove_index_for_users_current_sign_in_at.rb
+25
-0
db/schema.rb
db/schema.rb
+1
-2
No files found.
changelogs/unreleased/remove_index_for_users-current_sign_in_at.yml
0 → 100644
View file @
e3f88e68
---
title
:
Remove index for users.current sign in at
merge_request
:
10401
author
:
blackst0ne
db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
0 → 100644
View file @
e3f88e68
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
RemoveIndexForUsersCurrentSignInAt
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
if
index_exists?
:users
,
:current_sign_in_at
if
Gitlab
::
Database
.
postgresql?
execute
'DROP INDEX CONCURRENTLY index_users_on_current_sign_in_at;'
else
remove_index
:users
,
:current_sign_in_at
end
end
end
def
down
add_concurrent_index
:users
,
:current_sign_in_at
end
end
db/schema.rb
View file @
e3f88e68
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20170
32912444
8
)
do
ActiveRecord
::
Schema
.
define
(
version:
20170
40223101
8
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -1252,7 +1252,6 @@ ActiveRecord::Schema.define(version: 20170329124448) do
add_index
"users"
,
[
"authentication_token"
],
name:
"index_users_on_authentication_token"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"confirmation_token"
],
name:
"index_users_on_confirmation_token"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"created_at"
],
name:
"index_users_on_created_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_trigram"
,
using: :gin
,
opclasses:
{
"email"
=>
"gin_trgm_ops"
}
add_index
"users"
,
[
"ghost"
],
name:
"index_users_on_ghost"
,
using: :btree
...
...
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