CREATE TABLE `document_upload_permission` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `staffID` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_staff_idx` (`staffID` ASC),
  CONSTRAINT `fk_staff`
    FOREIGN KEY (`staffID`)
    REFERENCES `staffaccounts` (`staffID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

ALTER TABLE `document_upload_permission` 
ADD UNIQUE INDEX `staffID_UNIQUE` (`staffID` ASC);


