3596 calculate vehicle journey at stops day offset rb201705311757
Created by: teddywing
When saving a VehicleJourney, calculate and update the day offset of all its VehicleJourneyAtStops. Any at-stops that can be assumed to occur on subsequent days will have their arrival_day_offset or departure_day_offset fields incremented.
This allows us to correctly handle vehicle journeys that span multiple days, like a train that stops running at 1:00am.
A migration is added to set a default of 0 (the current day) on the existing day offset fields in the vehicle_journey_at_stops table.