-- Migration: Add gender column to existing installations
-- Run this once in phpMyAdmin if you already have the database installed

USE smartkpi_hr;

-- Add gender column (safe - won't error if already exists on newer MySQL)
ALTER TABLE users 
ADD COLUMN IF NOT EXISTS gender ENUM('male','female') DEFAULT 'male' AFTER email;

-- Set default for existing users
UPDATE users SET gender='male' WHERE gender IS NULL;
