-- Ensure all employees are active by default
-- Update existing employees to active if status is NULL or empty

-- First, update employees table default
ALTER TABLE `employees` 
MODIFY COLUMN `employment_status` enum('active','inactive','terminated','resigned') 
DEFAULT 'active' NOT NULL;

-- Update existing NULL or empty status to 'active'
UPDATE `employees` 
SET `employment_status` = 'active' 
WHERE `employment_status` IS NULL 
OR `employment_status` = '';

-- Verify
SELECT 
    employment_status, 
    COUNT(*) as count 
FROM employees 
GROUP BY employment_status;
