Sha256: d8b993b22ee8174b34c81bc98efddc0eadc1c9e35c05331717fde36eceba5d4f
Contents?: true
Size: 535 Bytes
Versions: 4
Compression:
Stored size: 535 Bytes
Contents
class AddLongLatToAddress < ActiveRecord::Migration def up unless columns(:postal_addresses).collect {|c| c.name}.include?('latitude') add_column :postal_addresses, :latitude, :decimal, :precision => 12, :scale => 8 add_column :postal_addresses, :longitude, :decimal, :precision => 12, :scale => 8 end end def down if columns(:postal_addresses).collect {|c| c.name}.include?('latitude') remove_column :postal_addresses, :latitude remove_column :postal_addresses, :longitude end end end
Version data entries
4 entries across 4 versions & 1 rubygems