From 61dd59712ede9895e8d8ffae349ac1120aa4b69a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 28 Sep 2007 23:33:32 +0000 Subject: [PATCH] Rescale GPS points correctly when downgrading from v5 to v4. --- db/migrate/005_tile_tracepoints.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/005_tile_tracepoints.rb b/db/migrate/005_tile_tracepoints.rb index f4d27c18c..51a4d1376 100644 --- a/db/migrate/005_tile_tracepoints.rb +++ b/db/migrate/005_tile_tracepoints.rb @@ -16,6 +16,8 @@ class TileTracepoints < ActiveRecord::Migration end def self.down + Tracepoint.update_all("latitude = latitude / 10, longitude = longitude / 10") + add_index "gps_points", ["latitude", "longitude"], :name => "points_idx" remove_index "gps_points", :name => "points_tile_idx" remove_column "gps_points", "tile" -- 2.39.5