Rescale GPS points correctly when downgrading from v5 to v4.
This commit is contained in:
parent
6595f97c53
commit
61dd59712e
1 changed files with 2 additions and 0 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue