summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/database.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-08-07 12:13:15 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-08-07 12:13:15 +0200
commit7e9f6bdf90605d43f10bfe82a2611f9436546be7 (patch)
treea586d46a008453c7c13d10f3fcdea8fbbb6c939d /lib/Travelynx/Command/database.pm
parent1bb348ad9a62884309373a5249165478fd13a627 (diff)
dumpstops: provide backend name and type rather than just opaque IDs2.8.10
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r--lib/Travelynx/Command/database.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index f2b79f3..4389430 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -2600,6 +2600,28 @@ qq{select distinct checkout_station_id from in_transit where backend_id = 0;}
say
'If the migration fails due to a deadlock, re-run it after stopping all background workers';
},
+
+ # v55 -> v56
+ # include backend data in dumpstops command
+ sub {
+ my ($db) = @_;
+ $db->query(
+ qq{
+ create view stations_str as
+ select stations.name as name,
+ eva, lat, lon,
+ backends.name as backend,
+ iris as is_iris,
+ hafas as is_hafas,
+ efa as is_efa,
+ ris as is_ris
+ from stations
+ left join backends
+ on source = backends.id;
+ update schema_version set version = 56;
+ }
+ );
+ },
);
sub sync_stations {