OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/db/migrate/20200325101528_strip_whites...

12 lines
392 B

class StripWhitespaceFromUserAttributes < ActiveRecord::Migration[6.0]
def up
User.update_all('login = TRIM(login), mail = TRIM(mail)')
end
def down
warn <<~WARNING
We cannot restore leading and trailing white space in user login and mail attributes.
Please ensure you do not have logins with only leading or trailing white space differences.
WARNING
end
end