summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/database.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-01-18 18:36:11 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-01-18 18:36:11 +0100
commit3f08f86ac2ac65d458b0cd378b366003812b32fb (patch)
tree5a90a53b7d406ed2ca5c8c7837099b5772ede01a /lib/Travelynx/Command/database.pm
parent2a3dd77d27e3a82d40e3d538c8ed22bcacad1439 (diff)
migration: only select required fields1.29.13
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r--lib/Travelynx/Command/database.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index d8b04d2..4b83208 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -1225,7 +1225,7 @@ my @migrations = (
say 'Adjusting route schema, this may take a while ...';
- my $res = $db->select( 'in_transit_str', '*' );
+ my $res = $db->select( 'in_transit_str', [ 'route', 'user_id' ] );
while ( my $row = $res->expand->hash ) {
my @new_route;
for my $stop ( @{ $row->{route} } ) {
@@ -1242,9 +1242,8 @@ my @migrations = (
= $db->select( 'journeys', 'count(*) as count' )->hash->{count};
my $count = 0;
- $res = $db->select( 'journeys_str', '*' );
+ $res = $db->select( 'journeys_str', [ 'route', 'journey_id' ] );
while ( my $row = $res->expand->hash ) {
- my $id = $row->{journey_id};
my @new_route;
for my $stop ( @{ $row->{route} } ) {