CREATE TABLE IF NOT EXISTS `Employee_countActiveFromDates` ( `Employee_id` bigint(20) NOT NULL, `countActiveFromDates` datetime DEFAULT NULL, `countActiveFromDates_KEY` bigint(20) NOT NULL, PRIMARY KEY (`Employee_id`,`countActiveFromDates_KEY`), KEY `FK5183E457A4585B4A` (`countActiveFromDates_KEY`), KEY `FK5183E4575FCBC05F` (`Employee_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `Employee_countActiveFromDates` ADD CONSTRAINT `FK5183E4575FCBC05F` FOREIGN KEY (`Employee_id`) REFERENCES `role` (`id`), ADD CONSTRAINT `FK5183E457A4585B4A` FOREIGN KEY (`countActiveFromDates_KEY`) REFERENCES `project_class` (`id`);