Accordion bookings now record their instructors
Shipped 2026-10-26
Accordion will send Instructors, the IBA numbers of the instructors on each
flight. The auditing team reviews instructor videos against protocol, and a
later dashboard will list flights by instructor and tunnel. This change starts
capturing the data; the dashboard is separate work.
What changed
- Migration
0021addsinstructors JSONtoconnector_accordion_booking, with a multi-valued index so<iba_number> MEMBER OF (instructors)finds an instructor’s flights without a table scan. interpretDeliveryreads the field. Missing ornullstoresNULL(not sent);[]stores[](no instructor); duplicates are dropped. Anything other than an array of positive whole numbers rejects the record asinvalid_instructors.- The upsert replaces the list when a restatement sends one and keeps the previous list when it doesn’t, so a record that omits the field can’t wipe data sent earlier.
A JSON column rather than a child table: an IBA number is already
members.member_id, so there is nothing to resolve or store per instructor.
MySQL refuses CAST(... AS ... ARRAY) inside a stored routine, so 0021
guards the index with a prepared statement rather than the procedure pattern
used for the column.
- Jira: TUN-904
- Author: @alexhobday
Last updated on