Loading lib/Travelynx/Command/database.pm +40 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,45 @@ has description => 'Initialize or upgrade database layout'; has usage => sub { shift->extract_usage }; my $v72_migration_fyi = <<'EOF'; /\ / \ / !! \ / !! \ MANUAL ACTION REQUIRED / !! \ / \ / !! \ +------------+ Travlynx 2.21 (or more specifically, database schema v72) persists per-journey distance data in the database rather than computing it on-the-fly, as the latter is quite expensive and could cause long load times on the history pages. Adding this data for all journeys stored so far would take minutes to hours depending on database size, and is therefore not done as part of this migration. Please run the following command at your earliest convenience: $ carton exec perl index.pl stats compute-distances (adjust "carton exec" prefix, "sudo -u ...", environment variables, etc. as necessary for your setup -- use the same invocation as for, e.g., "perl index.pl maintenance") The command can operate while the travelynx services are running. Until this post-migration script has completed, users may be confronted with invalid or missing distance data in their history view for the current year and month. There is a short window in which such invalid distances may be cached -- this will happen whenever a user completes a journey and then opens the history page for the current year or the current month. If you want to ensure that all cached data is valid, you can follow up with the follow two commands: $ carton exec perl index.pl stats purge $ carton exec perl index.pl stats refresh-all EOF sub get_schema_version { my ( $db, $key ) = @_; my $version; Loading Loading @@ -3729,6 +3768,7 @@ qq{select distinct checkout_station_id from in_transit where backend_id = 0;} update schema_version set version = 72; } ); print $v72_migration_fyi; }, ); Loading Loading
lib/Travelynx/Command/database.pm +40 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,45 @@ has description => 'Initialize or upgrade database layout'; has usage => sub { shift->extract_usage }; my $v72_migration_fyi = <<'EOF'; /\ / \ / !! \ / !! \ MANUAL ACTION REQUIRED / !! \ / \ / !! \ +------------+ Travlynx 2.21 (or more specifically, database schema v72) persists per-journey distance data in the database rather than computing it on-the-fly, as the latter is quite expensive and could cause long load times on the history pages. Adding this data for all journeys stored so far would take minutes to hours depending on database size, and is therefore not done as part of this migration. Please run the following command at your earliest convenience: $ carton exec perl index.pl stats compute-distances (adjust "carton exec" prefix, "sudo -u ...", environment variables, etc. as necessary for your setup -- use the same invocation as for, e.g., "perl index.pl maintenance") The command can operate while the travelynx services are running. Until this post-migration script has completed, users may be confronted with invalid or missing distance data in their history view for the current year and month. There is a short window in which such invalid distances may be cached -- this will happen whenever a user completes a journey and then opens the history page for the current year or the current month. If you want to ensure that all cached data is valid, you can follow up with the follow two commands: $ carton exec perl index.pl stats purge $ carton exec perl index.pl stats refresh-all EOF sub get_schema_version { my ( $db, $key ) = @_; my $version; Loading Loading @@ -3729,6 +3768,7 @@ qq{select distinct checkout_station_id from in_transit where backend_id = 0;} update schema_version set version = 72; } ); print $v72_migration_fyi; }, ); Loading