Sha256: 1b20ade5f62a72ad50169b4255c5cb83a4103b274c6e6509b43dbde75b14f9d6

Contents?: true

Size: 522 Bytes

Versions: 5

Compression:

Stored size: 522 Bytes

Contents

class CreateShoppeCountries < ActiveRecord::Migration
  def up
    create_table :shoppe_countries do |t|
      t.string :name, :code2, :code3, :continent, :tld, :currency
      t.boolean :eu_member, :default => false
    end
    add_column :shoppe_orders, :country_id, :integer, :after => :postcode
    remove_column :shoppe_orders, :country
  end
  
  def down
    add_column :shoppe_orders, :country, :string, :after => :ip_address
    remove_column :shoppe_orders, :country_id
    drop_table :shoppe_countries
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shoppe-0.0.15 db/migrate/20131017180920_create_shoppe_countries.rb
shoppe-0.0.14 db/migrate/20131017180920_create_shoppe_countries.rb
shoppe-0.0.13 db/migrate/20131017180920_create_shoppe_countries.rb
shoppe-0.0.12 db/migrate/20131017180920_create_shoppe_countries.rb
shoppe-0.0.11 db/migrate/20131017180920_create_shoppe_countries.rb