[
  {
    "type": "create_table",
    "description": "Create scheduleTimeOffRequests table for employee time off requests",
    "database": "{{store}}",
    "check_query": "SHOW TABLES LIKE 'scheduleTimeOffRequests'",
    "sql": "CREATE TABLE `scheduleTimeOffRequests` (\n  `requestId` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `employeeId` int(10) unsigned NOT NULL COMMENT 'FK to employees.employeeId',\n  `requestType` enum('vacation','sick','personal','other') NOT NULL COMMENT 'Type of time off',\n  `startDate` date NOT NULL COMMENT 'First day off',\n  `endDate` date NOT NULL COMMENT 'Last day off (inclusive)',\n  `reason` text NULL COMMENT 'Employee reason for request',\n  `status` enum('pending','approved','denied','cancelled') NOT NULL DEFAULT 'pending' COMMENT 'Request status',\n  `submittedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'When request was submitted',\n  `reviewedByUserId` int(10) unsigned NULL COMMENT 'Manager who reviewed the request',\n  `reviewedAt` timestamp NULL COMMENT 'When request was reviewed',\n  `reviewNote` text NULL COMMENT 'Manager note on decision',\n  PRIMARY KEY (`requestId`),\n  KEY `idx_employee_status` (`employeeId`, `status`),\n  KEY `idx_dates` (`startDate`, `endDate`),\n  KEY `idx_status` (`status`),\n  KEY `idx_submittedAt` (`submittedAt`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Employee time off requests with approval workflow'"
  }
]
