Patch #19233 ยป 0001-irreversible-to-reversible-remove-users-mail.patch
| db/migrate/20150113213922_remove_users_mail.rb | ||
|---|---|---|
|
end
|
||
|
def self.down
|
||
|
raise IrreversibleMigration
|
||
|
add_column :users, :mail, :string, limit: 60, default: '', null: false
|
||
|
EmailAddress.all.each do |a|
|
||
|
a.user.update_attribute :mail, a.address
|
||
|
end
|
||
|
end
|
||
|
end
|
||