
ALTER TABLE PUBLIC_CANDIDACY_HASH_CODE ADD COLUMN OJB_CONCRETE_CLASS longtext;
ALTER TABLE PUBLIC_CANDIDACY_HASH_CODE ADD UNIQUE KEY (VALUE);

UPDATE PUBLIC_CANDIDACY_HASH_CODE SET OJB_CONCRETE_CLASS = 'net.sourceforge.fenixedu.domain.candidacyProcess.DegreeOfficePublicCandidacyHashCode';

alter table `PUBLIC_CANDIDACY_HASH_CODE` add column `KEY_PHD_PROGRAM_CANDIDACY_PROCESS` int(11);
alter table `PUBLIC_CANDIDACY_HASH_CODE` add column `OID_PHD_PROGRAM_CANDIDACY_PROCESS` bigint(20);
alter table `PUBLIC_CANDIDACY_HASH_CODE` add index (`KEY_INDIVIDUAL_CANDIDACY_PROCESS`), add index (`OID_INDIVIDUAL_CANDIDACY_PROCESS`);
alter table `PUBLIC_CANDIDACY_HASH_CODE` add index (`KEY_PHD_PROGRAM_CANDIDACY_PROCESS`), add index (`OID_PHD_PROGRAM_CANDIDACY_PROCESS`);
alter table `PUBLIC_CANDIDACY_HASH_CODE` add index (`KEY_ROOT_DOMAIN_OBJECT`), add index (`OID_ROOT_DOMAIN_OBJECT`);

alter table `PROCESS` add index (`KEY_CANDIDACY_HASH_CODE`), add index (`OID_CANDIDACY_HASH_CODE`);