specification
specification copied to clipboard
Key schemes for regular_schedule and holiday_schedule
I'm looking at the three foreign key fields in each of the two schedule tables.
Would it make sense to have a service_schedule table with the schedule (however that is represented) and a FK to the service, and applies_from_date and applies_until_date properties to represent holiday hours etc? There would need to be similar location_schedule and service_at_location_schedule. But then there would not be the three FK fields on the schedule tables, two of which will be NULL for any given record, which I fear might be error prone.
To simplify validation, we could also have just the applies_from_date, and have it implied that each schedule applies until the apply date of the next record, as ordered by apply date.
This is related to #175
I'm not certain of the original reason for the 'regular_schedule' and 'holiday_schedule' approach, but I would anticipate it is partly down to the reality of many resource directories not managing a full calendar of when a service will be available - and so collecting general indications of when it might be available.
I suspect we may need to maintain a parallel approach of 'general dates' using these current tables, and more specific dates, using an approach to be developed in #175
I'm closing this as I believe that we've addressed this via the move to RRULE earlier. In 3.0, objects have an array of schedules which can describe "Normal" and "Holiday" schedules.