CREATE TABLE `duty_leave_remarks` (
  `dlrId` INT NOT NULL AUTO_INCREMENT,
  `dlrName` VARCHAR(80) NULL,
  `dlrDescription` LONGTEXT NULL,
  PRIMARY KEY (`dlrID`));
  
CREATE TABLE `duty_leave_privileges` (
  `dlpID` INT NOT NULL AUTO_INCREMENT,
  `staffID` INT NULL,
  `deptID` INT NULL,
  `batchID` INT NULL,
  PRIMARY KEY (`dlpID`));
  
  ALTER TABLE `duty_leave_privileges` 
ADD UNIQUE INDEX `dlpID_UNIQUE` (`dlpID` ASC);
ALTER TABLE `duty_leave_remarks` 
ADD UNIQUE INDEX `dlrID_UNIQUE` (`dlrId` ASC);
ALTER TABLE `attendance` 
ADD COLUMN `dlrId` INT NULL AFTER `sbsID`;


ALTER TABLE studentachievements_event_category ADD COLUMN isUploadOption INT (3) DEFAULT 0;


CREATE TABLE staff_achievements_docs(
  id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  staffaccounts_id INT(8) DEFAULT NULL,
  department_id INT(8) DEFAULT NULL,
  docName varchar(100) DEFAULT NULL,
  docPath varchar(150) NOT NULL,
  docUploadTime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  docImgPath varchar(500) DEFAULT NULL,
  docSWFPath varchar(500) DEFAULT NULL,
  docPDFPath varchar(500) DEFAULT NULL  
) ENGINE=INNODB;


ALTER TABLE staff_achievements_docs ADD COLUMN staffachievements_staffdetails_id INT(3) DEFAULT NULL;

