peter-mount / opendata

Latest & first public version of my code that monitors the UK Rail Network in real time using Open Data feeds
Other
12 stars 2 forks source link

Darwin timetable import may not import correctly #59

Open peter-mount opened 8 years ago

peter-mount commented 8 years ago

Whilst importing the Santa special train for Dec 24th, I noticed that not everything was setup in the forecast_entry table.

Specifically, ldb, tm fields. This is a low priority bug as it's just this one dummy schedule.

Anyhow from the notes for the script on a temporary fix for this:

 Get the forecast id
 select * from darwin.forecast where rid='20151224SANTA';
 This returns an id, 7124819 in this instance.

 Update the forecasts:
 begin;
 update darwin.forecast_entry set ldb=true, tm=coalesce(ptd,pta),term=false, delay='00:00:00', etarr=pta, etdep=pta where fid=7124819;
 commit;