 # -----------------
 
 CREATE TABLE `ticket_type` (
-  `ticket_type_name` varchar(16) NOT NULL DEFAULT '',
+  `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;

  `job_desc` varchar(160) DEFAULT NULL,
  `job_dir` varchar(255) DEFAULT NULL,
  `status` enum('awaiting_dispatcher_response','awaiting_user_response','done') NOT NULL DEFAULT 'awaiting_user_response',
  `dispatcher_reference` varchar(255) DEFAULT NULL,
  `dispatcher_data` text,
  `dispatcher_status` enum('not_submitted','queued','submitted','running','done','failed','deleted') NOT NULL DEFAULT 'not_submitted',
  `modified_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`job_id`),
  KEY `ticket_id` (`ticket_id`),
  CONSTRAINT `job_ibfk_1` FOREIGN KEY (`ticket_id`) REFERENCES `ticket` (`ticket_id`) ON DELETE CASCADE

  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 DEFAULT CHARSET=latin1;