diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-21 15:46:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-21 15:46:19 +0200 |
commit | 78b2d995ef32b60cfbde086953c5069e327e08a5 (patch) | |
tree | 35aec7e711a9876642652bc820a3c4883700482e /lib/Travelynx/Command | |
parent | 24d0943cdc3f50ac1063b6fb8308ce21d940c67d (diff) |
Ignore stations without coordinates in distance calculation
Reported by @marudor
Diffstat (limited to 'lib/Travelynx/Command')
-rw-r--r-- | lib/Travelynx/Command/database.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index b8131eb..7a9aed3 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -123,6 +123,20 @@ my @migrations = ( } ); }, + + # v2 -> v3 + # A bug in the journey distance calculation caused excessive distances to be + # reported for routes covering stations without GPS coordinates. Ensure + # all caches are rebuilt. + sub { + my ($dbh) = @_; + return $dbh->do( + qq{ + delete from journey_stats; + update schema_version set version = 3; + } + ); + }, ); sub setup_db { |