Project

General

Profile

Patch #19233 ยป 0001-irreversible-to-reversible-remove-users-mail.patch

Denis Savitskiy, 2015-03-02 11:29

View differences:

db/migrate/20150113213922_remove_users_mail.rb
4 4
  end
5 5

  
6 6
  def self.down
7
    raise IrreversibleMigration
7
    add_column :users, :mail, :string, limit: 60, default: '', null: false
8

  
9
    EmailAddress.all.each do |a|
10
      a.user.update_attribute :mail, a.address
11
    end
8 12
  end
9 13
end
    (1-1/1)