Which clinics/databases/records are included in bookings?
All bookings from all databases are included. However:
bookings_arch.Why do we see old bookings in the bookings table?
Bookings remain in the live bookings table until the nightly archive job runs and moves them. If they are recurring bookings, they can still appear in the main table even if the original booking date is older.
What is meant by a “recurring booking”?
A recurring booking is created with a recurrence rule (not the same as a rebooked/changed appointment).
To view them in the app:
2024-01-01 – 2024-11-25)Are patients in booking_attendees also archived?
Yes. All booking-related tables are archived nightly to improve performance.
Active table: booking_attendees
Archive table: booking_attendees_arch
Which other tables are archived?
booking_attendees → booking_attendees_arch
booking_exdates → booking_exdates_arch
booking_rrule_by_days → booking_rrule_by_days_arch
booking_rrules → booking_rrules_arch
bookings → bookings_arch
emails → emails_arch
sms → sms_arch
snail_mails → snail_mails_arch
How does the archiving process work?
A nightly job moves all records older than 30 days from active tables to _arch tables.
This applies across bookings, attendees, communication, and recurrence data.
Goal: keep the booking system fast by reducing the size of active tables.