CREATE TABLE `roster_schedule_span` (
  `roster` varchar(32) DEFAULT NULL,
  `roster_schedule_span_proposal` varchar(32) DEFAULT NULL,
  `sys_id` char(32) NOT NULL,
  PRIMARY KEY (`sys_id`),
  KEY `roster` (`roster`),
  KEY `roster_schedule_span_proposal` (`roster_schedule_span_proposal`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `cmn_schedule_span` (
  `schedule` varchar(32) DEFAULT NULL,
  `name` varchar(80) DEFAULT NULL,
  `notes` mediumtext DEFAULT NULL,
  `sys_class_name` varchar(80) DEFAULT NULL,
  `show_as` varchar(40) DEFAULT NULL,
  `type` varchar(40) DEFAULT NULL,
  `start_date_time` varchar(40) DEFAULT NULL,
  `end_date_time` varchar(40) DEFAULT NULL,
  `all_day` tinyint(1) DEFAULT NULL,
  `repeat_until` int(11) DEFAULT NULL,
  `repeat_type` varchar(40) DEFAULT NULL,
  `repeat_count` int(11) DEFAULT NULL,
  `days_of_week` varchar(40) DEFAULT NULL,
  `monthly_type` varchar(40) DEFAULT NULL,
  `yearly_type` varchar(40) DEFAULT NULL,
  `month` int(11) DEFAULT NULL,
  `float_week` varchar(40) DEFAULT NULL,
  `float_day` varchar(40) DEFAULT NULL,
  `parent` varchar(32) DEFAULT NULL,
  `override_start_date` int(11) DEFAULT NULL,
  `sys_id` char(32) NOT NULL,
  `sys_updated_by` varchar(40) DEFAULT NULL,
  `sys_updated_on` datetime DEFAULT NULL,
  `sys_created_by` varchar(40) DEFAULT NULL,
  `sys_created_on` datetime DEFAULT NULL,
  `sys_mod_count` int(11) DEFAULT NULL,
  `user` varchar(32) DEFAULT NULL,
  `group` varchar(32) DEFAULT NULL,
  `u_in_queue` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`sys_id`),
  KEY `schedule` (`schedule`),
  KEY `sys_class_name` (`sys_class_name`),
  KEY `parent` (`parent`),
  KEY `group` (`group`),
  KEY `djhrgdql_index1` (`schedule`,`repeat_type`,`end_date_time`,`start_date_time`),
  KEY `wevepvec_index2` (`schedule`,`repeat_type`,`repeat_until`,`start_date_time`),
  KEY `user_2` (`user`,`name`,`schedule`,`start_date_time`,`end_date_time`),
  KEY `idx` (`user`,`type`,`start_date_time`),
  KEY `idx1` (`user`,`type`,`u_in_queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;