Commit 4cc510d7 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

use polyline when computing monthly/yearly distance travelled

Closes #40
parent 6826c033
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1793,6 +1793,7 @@ sub startup {
				uid           => $uid,
				cancelled     => $opt{cancelled} ? 1 : 0,
				verbose       => 1,
				with_polyline => 1,
				after         => $interval_start,
				before        => $interval_end
			);
+15 −0
Original line number Diff line number Diff line
@@ -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 {