-- Fix leave_requests status column to use lowercase consistently
-- This migration updates all existing records to use lowercase status values

UPDATE leave_requests 
SET status = LOWER(status)
WHERE status IN ('Pending', 'ManagerApproved', 'Approved', 'Rejected');

-- Verify the update
-- SELECT status, COUNT(*) FROM leave_requests GROUP BY status;
