Sha256: b0f645aa2cc5bdfdd02eeffa98e79b91ab367bd6f3a67ac6845715a9d3fb3024
Contents?: true
Size: 549 Bytes
Versions: 1
Compression:
Stored size: 549 Bytes
Contents
class CopyLatLongPropsToLatLongColumns < ActiveRecord::Migration def up G5Updatable::Location.all.each do |location| location.latitude = location.properties['latitude'] location.longitude = location.properties['longitude'] location.save end end def down G5Updatable::Location.all.each do |location| location.properties['latitude'] = location.latitude location.proper['longitude'] = location.longitude location.latitude = nil location.longitude = nil location.save end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g5_updatable-0.20.3.pre.1 | db/migrate/20151103050229_copy_lat_long_props_to_lat_long_columns.rb |