   PRIMARY KEY (`job_message_id`),
   KEY `job_id` (`job_id`),
   CONSTRAINT `job_message_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `job` (`job_id`) ON DELETE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `ticket` (
  `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ticket_name` varchar(16) NOT NULL DEFAULT '',
  `ticket_type_name` varchar(16) NOT NULL,
  `owner_id` varchar(32) NOT NULL,
  `owner_type` enum('user','session') NOT NULL DEFAULT 'session',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',

# -----------------

CREATE TABLE `ticket_type` (
  `ticket_type_name` varchar(32) NOT NULL DEFAULT '',
  `ticket_type_caption` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`ticket_type_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
