-- Migration: Add Category field to employees table
-- Date: 2025-12-18
-- Description: Adds employee_category field to employees table for skill level classification

-- Check if column exists, if yes modify it, if no add it
-- Note: MySQL doesn't support IF NOT EXISTS for ALTER TABLE, so we'll handle it in PHP

-- Add or modify category column
-- If column exists as varchar, we'll modify it to enum
-- If column doesn't exist, we'll add it as enum
ALTER TABLE `employees` 
MODIFY COLUMN `employee_category` enum('Unskilled','Semi-Skilled','Skilled','Highly Skilled') DEFAULT NULL 
AFTER `employment_status`;

-- Add index for better query performance (if not exists)
ALTER TABLE `employees` 
ADD INDEX `idx_employee_category` (`employee_category`);
