Sha256: 3b40fa6f2e14989211fc7fa6d4ee44299280989a674053d9261f31bd6600bf02

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

# This migration comes from calagator (originally 11)
class ChangeLatLongType < ActiveRecord::Migration
  def self.up
    # :decimal is more precise than :float, and we need that for lat/long.
    change_column :venues, :latitude, :decimal, :precision => 15, :scale => 10
    change_column :venues, :longitude, :decimal, :precision => 15, :scale => 10
  end

  def self.down
    change_column :venues, :latitude, :float
    change_column :venues, :longitude, :float
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calagator-0.0.1.pre1 spec/dummy/db/migrate/20150309023313_change_lat_long_type.calagator.rb