-- Add is_automatic_clockout field to attendance table
-- This field tracks whether the clockout was automatic (after 12 hours) or manual

ALTER TABLE attendance 
ADD COLUMN is_automatic_clockout BOOLEAN DEFAULT FALSE 
AFTER clock_out_time;

-- Add index for querying automatic clockouts
CREATE INDEX idx_automatic_clockout ON attendance(is_automatic_clockout);

