Commit e37c46b6 authored by Alexis Reigel's avatar Alexis Reigel

downcase all GpgSignature#gpg_key_user_email

parent d71d10c9
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment