Add Missed status

This commit is contained in:
2026-04-06 00:39:37 -06:00
parent 6d4c9a5e65
commit d8e2c8c95d
3 changed files with 13 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
-- V18: Normalize past appointments.
-- Any appointment that is still 'Booked' but the date/time has passed should be marked as 'Missed'.
UPDATE appointment
SET appointmentStatus = 'Missed'
WHERE LOWER(appointmentStatus) = 'booked'
AND (
appointmentDate < CURRENT_DATE
OR (appointmentDate = CURRENT_DATE AND appointmentTime < CURRENT_TIME)
);