Add Missed status
This commit is contained in:
@@ -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)
|
||||
);
|
||||
Reference in New Issue
Block a user