summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-04-14 18:14:19 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-04-14 18:22:49 +0200
commit4cc510d7109a371f2458628e74b9cdb664eb2465 (patch)
tree1737e999590c630278270d8a54c7455662217f30 /lib/Travelynx
parent6826c033868ac03d91e20eafe94fbb9b0c88b73c (diff)
use polyline when computing monthly/yearly distance travelled1.15.10
Closes #40
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Command/database.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index 22d8a93..59e41d9 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -997,6 +997,21 @@ my @migrations = (
}
);
},
+
+ # v20 -> v21
+ # After introducing polyline support, journey distance calculation diverged:
+ # the detail view (individual train) used the polyline, whereas monthly and
+ # yearly statistics were still based on beeline between intermediate stops.
+ # Release 1.16.0 fixes this -> ensure all caches are rebuilt.
+ sub {
+ my ($db) = @_;
+ $db->query(
+ qq{
+ truncate journey_stats;
+ update schema_version set version = 21;
+ }
+ );
+ },
);
sub setup_db {