Sha256: 41d51b5bc7cd897ac89384600153d9f551445bb987d97c931a28a67935843f7c
Contents?: true
Size: 623 Bytes
Versions: 18
Compression:
Stored size: 623 Bytes
Contents
# This migration comes from g5_updatable (originally 20151103050229) class CopyLatLongPropsToLatLongColumns < ActiveRecord::Migration[4.2] 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
18 entries across 18 versions & 1 rubygems