create table CANDIDACY (
  ID_INTERNAL int(11) NOT NULL auto_increment,
  NUMBER int(11),
  OJB_CONCRETE_CLASS varchar(255) NOT NULL default '',  
  KEY_PERSON int NOT NULL,
  KEY_EXECUTION_DEGREE int DEFAULT NULL,
  KEY_PRECEDENT_DEGREE_INFORMATION int DEFAULT NULL,
  KEY_ROOT_DOMAIN_OBJECT int not null,
  PRIMARY KEY(ID_INTERNAL),
  INDEX (KEY_PERSON),
  INDEX (KEY_EXECUTION_DEGREE),
  INDEX (KEY_PRECEDENT_DEGREE_INFORMATION),
  INDEX (KEY_ROOT_DOMAIN_OBJECT)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


create table CANDIDACY_SITUATION (
  ID_INTERNAL int(11) NOT NULL auto_increment,
  SITUATION_DATE DATETIME,
  OJB_CONCRETE_CLASS varchar(255) NOT NULL default '', 
  KEY_EMPLOYEE int DEFAULT NULL,
  KEY_CANDIDACY int NOT NULL,
  KEY_ROOT_DOMAIN_OBJECT int not null,
  PRIMARY KEY(ID_INTERNAL),
  INDEX (KEY_EMPLOYEE),
  INDEX (KEY_CANDIDACY),
  INDEX (KEY_ROOT_DOMAIN_OBJECT)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
