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

Version Path
kdmny-spree-0.0.1 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.8.4 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.4.1 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.4.0 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.5.0 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.5.1 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.6.0 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.7.0 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.7.1 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.8.0 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.8.1 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.8.2 db/migrate/20080703184654_update_country_rename_name.rb
spree-0.8.3 db/migrate/20080703184654_update_country_rename_name.rb