Sha256: 87ffd12bd904015e8197bcb4646683fc7399f7c1dda81fa93772d4e3bb59fd71
Contents?: true
Size: 543 Bytes
Versions: 13
Compression:
Stored size: 543 Bytes
Contents
class UpdateCountryRenameName < ActiveRecord::Migration def self.up change_table :countries do |t| t.rename :name, :iso_name t.rename :printable_name, :name end Country.update(119, { :name => 'Macedonia' }) Country.update(197, { :name => 'Taiwan' }) Country.update(105, { :name => 'North Korea' }) Country.update(106, { :name => 'South Korea' }) end def self.down change_table :countries do |t| t.rename :name, :printable_name t.rename :iso_name, :name end end end
Version data entries
13 entries across 13 versions & 2 rubygems