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
e37c46b6
Commit
e37c46b6
authored
Aug 28, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
downcase all GpgSignature#gpg_key_user_email
parent
d71d10c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
db/post_migrate/20170828124518_downcase_gpg_key_user_email_on_gpg_signatures.rb
...28124518_downcase_gpg_key_user_email_on_gpg_signatures.rb
+23
-0
No files found.
db/post_migrate/20170828124518_downcase_gpg_key_user_email_on_gpg_signatures.rb
0 → 100644
View file @
e37c46b6
class
DowncaseGpgKeyUserEmailOnGpgSignatures
<
ActiveRecord
::
Migration
DOWNTIME
=
false
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
class
GpgSignature
<
ActiveRecord
::
Base
self
.
table_name
=
'gpg_signatures'
include
EachBatch
end
def
up
GpgSignature
.
each_batch
do
|
relation
|
relation
.
update_all
(
'gpg_key_user_email = LOWER(gpg_key_user_email)'
)
end
end
def
down
# we can't revert the downcasing, but actually we don't need to really, as
# downcasing the emails is not a harmful change.
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