Database: create index on real_departure to speed up latest journey queries

This commit is contained in:
Birte Kristina Friesel 2023-08-22 09:10:54 +02:00
parent 6c343f2f68
commit 6ca55f83b1
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -1903,9 +1903,19 @@ my @migrations = (
}
);
},
);
# TODO add 'hafas' column to in_transit (and maybe journeys? undo/redo needs something to work with...)
# v48 -> v49
# create indexes for common queries
sub {
my ($db) = @_;
$db->query(
qq{
create index uid_real_departure_idx on journeys (user_id, real_departure);
update schema_version set version = 49;
}
);
},
);
sub sync_stations {
my ( $db, $iris_version ) = @_;