Skip to content

Commit

Permalink
fix auckland headsigns
Browse files Browse the repository at this point in the history
  • Loading branch information
consindo committed Feb 26, 2024
1 parent a8e9001 commit 7b622d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/importers/regions/nz-akl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ class AucklandImporter extends SingleImporter {
WHERE routes.route_short_name = routes.route_long_name;
`)
log.info('Post Import: Updated route long names to trip headsign')

await sqlRequest.query(`
UPDATE trips
SET trip_headsign = RIGHT(trip_headsign, LEN(trip_headsign) - PATINDEX('% To %', trip_headsign) - 3);
`)
log.info('Post Import: Updated trip headsigns to the headsigns only')
}
}

Expand Down

0 comments on commit 7b622d9

Please sign in to comment.