mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
Change 20150113213922_remove_users_mail.rb from Irreversible to Reversible (#19233).
git-svn-id: http://svn.redmine.org/redmine/trunk@14052 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b1c0c690c0
commit
0965aafd51
@ -4,6 +4,10 @@ class RemoveUsersMail < ActiveRecord::Migration
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
add_column :users, :mail, :string, :limit => 60, :default => '', :null => false
|
||||
|
||||
EmailAddress.where(:is_default => true).each do |a|
|
||||
User.where(:id => a.user_id).update_all(:mail => a.address)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user