
 CREATE TABLE `VACATION_PERIOD` (
  `NAME` text NOT NULL,
  `END_DATE` text NOT NULL,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_NEXT_PERIOD` int(11) default NULL,
  `KEY_PREVIOUS_PERIOD` int(11) default NULL,
  `KEY_ROOT_DOMAIN_OBJECT` int(11) default NULL,
  `START_DATE` text NOT NULL, 
  `CREATION_ENTITY` text,
  `CREATION_ENTITY_DATE` date default NULL,
  `UPDATE_ENTITY` text,
  `UPDATE_ENTITY_DATE` datetime default NULL,
  PRIMARY KEY  (`ID_INTERNAL`),
  KEY `KEY_NEXT_PERIOD` (`KEY_NEXT_PERIOD`),
  KEY `KEY_PREVIOUS_PERIOD` (`KEY_PREVIOUS_PERIOD`),
  KEY `KEY_ROOT_DOMAIN_OBJECT` (`KEY_ROOT_DOMAIN_OBJECT`)
) TYPE=InnoDB; 

alter table EXECUTION_DEGREE add column KEY_VACATION_PERIOD int(11) null;
alter table EXECUTION_DEGREE add index(KEY_VACATION_PERIOD);