Rescale GPS points correctly when downgrading from v5 to v4.

This commit is contained in:
Tom Hughes 2007-09-28 23:33:32 +00:00
parent 6595f97c53
commit 61dd59712e

View file

@ -16,6 +16,8 @@ class TileTracepoints < ActiveRecord::Migration
end end
def self.down def self.down
Tracepoint.update_all("latitude = latitude / 10, longitude = longitude / 10")
add_index "gps_points", ["latitude", "longitude"], :name => "points_idx" add_index "gps_points", ["latitude", "longitude"], :name => "points_idx"
remove_index "gps_points", :name => "points_tile_idx" remove_index "gps_points", :name => "points_tile_idx"
remove_column "gps_points", "tile" remove_column "gps_points", "tile"