Skip to content
Haily edited this page Feb 9, 2014 · 1 revision

log_category

CREATE TABLE IF NOT EXISTS `log_category` (
  `CID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Category ID',
  `PID` int(10) NOT NULL COMMENT 'future foreign key',
  `UID` int(10) NOT NULL COMMENT 'future foreign key',
  `name` varchar(255) NOT NULL COMMENT 'name of individual category node',
  `color` varchar(6) DEFAULT NULL COMMENT 'HEX format color code',
  PRIMARY KEY (`CID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

log_entry

CREATE TABLE IF NOT EXISTS `log_entry` (
  `LID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Log Entry ID',
  `UID` int(10) NOT NULL COMMENT 'future foreign key',
  `CID` int(10) NOT NULL COMMENT 'future foreign key',
  `startDateTime` datetime NOT NULL,
  `endDateTime` datetime NOT NULL,
  `duration` int(10) NOT NULL COMMENT 'duration recorded in minutes',
  `notes` text,
  PRIMARY KEY (`LID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table represents unique time log entries.' AUTO_INCREMENT=1 ;

Clone this wiki locally