-- Migration: Add site_master table
-- Date: 2025-12-15
-- Description: Creates site_master table with site_id, site_name, location, region, and unit_manager

-- Site Master Table (Extended site information)
CREATE TABLE IF NOT EXISTS `site_master` (
  `site_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `region` varchar(100) NOT NULL,
  `unit_manager` varchar(255),
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`site_id`),
  KEY `idx_site_name` (`site_name`),
  KEY `idx_region` (`region`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

