Device Activity Table

CREATE TABLE IF NOT EXISTS `mydb`.`DeviceActivity` (
  `SystemID` VARCHAR(45) NOT NULL,
  `DateOfActivity` DATE NOT NULL,
  `AdminID` VARCHAR(45) NULL,
  `Activity` ENUM('Repair','Help','Replace','Return','Other') NULL,
  `Comments` TEXT NULL,
  PRIMARY KEY (`SystemID`, `DateOfActivity`),
  INDEX `fk_DeviceActivity_Administrator1_idx` (`AdminID` ASC),
  CONSTRAINT `fk_DeviceActivity_Device1`
    FOREIGN KEY (`SystemID`)
    REFERENCES `mydb`.`Device` (`SystemID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_DeviceActivity_Administrator1`
    FOREIGN KEY (`AdminID`)
    REFERENCES `mydb`.`Administrator` (`AdminID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'Information on each device interaction\n'
Topic revision: r1 - 2013-10-10 - JimSkon
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback