
START TRANSACTION;

INSERT INTO CONTENT (OID,EXECUTION_PATH,VISIBLE,KEY_MODULE_ROOT_DOMAIN_OBJECT,OID_MODULE_ROOT_DOMAIN_OBJECT,MAXIMIZABLE,PREFIX,KEY_INITIAL_CONTENT,OID_INITIAL_CONTENT,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (1198296588677,null,null,null,null,null,'/',null,null,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','2009-06-29 18:21:26','pt17:Programa Doutoral',null,null,null,'pt17:programa-doutoral','net.sourceforge.fenixedu.domain.functionalities.Module',null,null,null,null,1,1035087118337,null,null)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266629,10,1,1,'3f3bf92b-128b-4894-8a8e-58f98270dd3f:1be939bd-9f91-409f-87ec-c2e8da8c3dc1','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',1,1198296588677,2,1198296515279,1,1035087118337)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(1,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','3f3bf92b-128b-4894-8a8e-58f98270dd3f:1be939bd-9f91-409f-87ec-c2e8da8c3dc1') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(2,'3f3bf92b-128b-4894-8a8e-58f98270dd3f','3f3bf92b-128b-4894-8a8e-58f98270dd3f:1be939bd-9f91-409f-87ec-c2e8da8c3dc1') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO EXECUTION_PATH (OID,EXECUTION_PATH,CONTENT_ID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3521873185678,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateCandidacyIdentification','d1a23755-e809-4ab6-a0ab-4d2de0bb79c6',3,8590647686,1,1035087118337)  ;

INSERT INTO CONTENT (OID,EXECUTION_PATH,VISIBLE,KEY_EXECUTION_PATH_VALUE,OID_EXECUTION_PATH_VALUE,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (8590647686,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateCandidacyIdentification',null,4,3521873185678,'33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','2009-06-29 18:22:14','en6:Acesso',null,null,null,'en6:acesso','net.sourceforge.fenixedu.domain.functionalities.Functionality',null,null,null,null,1,1035087118337,null,null)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266630,0,1,1,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1:33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',5,8590647686,6,1198296588677,1,1035087118337)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(3,'33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','d1a23755-e809-4ab6-a0ab-4d2de0bb79c6') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(4,'d1a23755-e809-4ab6-a0ab-4d2de0bb79c6','33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(5,'33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(6,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO EXECUTION_PATH (OID,EXECUTION_PATH,CONTENT_ID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3521873185679,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCandidacyIdentificationRecovery','0e0a3805-3b30-4cad-b01d-b71bdd38666d',7,8590647687,1,1035087118337)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266631,1,1,1,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1:20d49da0-410a-4f09-850a-8d53cbd5ae8e','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',8,8590647687,9,1198296588677,1,1035087118337)  ;

INSERT INTO CONTENT (OID,EXECUTION_PATH,VISIBLE,KEY_EXECUTION_PATH_VALUE,OID_EXECUTION_PATH_VALUE,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (8590647687,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCandidacyIdentificationRecovery',null,10,3521873185679,'20d49da0-410a-4f09-850a-8d53cbd5ae8e','2009-06-29 18:22:52','en16:Recuperar Acesso',null,null,null,'en16:recuperar-acesso','net.sourceforge.fenixedu.domain.functionalities.Functionality',null,null,null,null,1,1035087118337,null,null)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(7,'20d49da0-410a-4f09-850a-8d53cbd5ae8e','0e0a3805-3b30-4cad-b01d-b71bdd38666d') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(8,'20d49da0-410a-4f09-850a-8d53cbd5ae8e','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:20d49da0-410a-4f09-850a-8d53cbd5ae8e') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(9,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:20d49da0-410a-4f09-850a-8d53cbd5ae8e') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(10,'0e0a3805-3b30-4cad-b01d-b71bdd38666d','20d49da0-410a-4f09-850a-8d53cbd5ae8e') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266632,2,1,1,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1:3fbcf989-1c06-44cc-b326-4fe018fbbee7','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',11,8590647688,12,1198296588677,1,1035087118337)  ;

INSERT INTO EXECUTION_PATH (OID,EXECUTION_PATH,CONTENT_ID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3521873185680,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateCandidacy','605bd951-c560-4244-81bd-34052b154512',13,8590647688,1,1035087118337)  ;

INSERT INTO CONTENT (OID,EXECUTION_PATH,VISIBLE,KEY_EXECUTION_PATH_VALUE,OID_EXECUTION_PATH_VALUE,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (8590647688,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateCandidacy',null,14,3521873185680,'3fbcf989-1c06-44cc-b326-4fe018fbbee7','2009-06-29 18:24:11','en9:Submissao',null,null,null,'en9:submissao','net.sourceforge.fenixedu.domain.functionalities.Functionality',null,null,null,null,1,1035087118337,null,null)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(11,'3fbcf989-1c06-44cc-b326-4fe018fbbee7','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:3fbcf989-1c06-44cc-b326-4fe018fbbee7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(12,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:3fbcf989-1c06-44cc-b326-4fe018fbbee7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(13,'3fbcf989-1c06-44cc-b326-4fe018fbbee7','605bd951-c560-4244-81bd-34052b154512') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(14,'605bd951-c560-4244-81bd-34052b154512','3fbcf989-1c06-44cc-b326-4fe018fbbee7') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266633,3,1,1,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1:cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',15,8590647689,16,1198296588677,1,1035087118337)  ;

INSERT INTO EXECUTION_PATH (OID,EXECUTION_PATH,CONTENT_ID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3521873185681,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateRefereeLetter','fb86c1fe-6050-4b80-aa2d-2b02e8490a19',17,8590647689,1,1035087118337)  ;

INSERT INTO CONTENT (OID,EXECUTION_PATH,VISIBLE,KEY_EXECUTION_PATH_VALUE,OID_EXECUTION_PATH_VALUE,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (8590647689,'/candidacies/phdProgramCandidacyProcess.do?method=prepareCreateRefereeLetter',null,18,3521873185681,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','2009-06-29 18:24:29','en16:Carta Referencia',null,null,null,'en16:carta-referencia','net.sourceforge.fenixedu.domain.functionalities.Functionality',null,null,null,null,1,1035087118337,null,null)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(15,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(16,'1be939bd-9f91-409f-87ec-c2e8da8c3dc1','1be939bd-9f91-409f-87ec-c2e8da8c3dc1:cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(17,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','fb86c1fe-6050-4b80-aa2d-2b02e8490a19') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(18,'fb86c1fe-6050-4b80-aa2d-2b02e8490a19','cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE NODE SET OID=3551962749222,NODE_ORDER=56,ASCENDING=1,VISIBLE=0,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=19,OID_CHILD=403727070283,KEY_PARENT=20,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692'  ;

UPDATE NODE SET OID=3551938009130,NODE_ORDER=46,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=21,OID_CHILD=403727020501,KEY_PARENT=22,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970'  ;

UPDATE NODE SET OID=3551938009427,NODE_ORDER=47,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=23,OID_CHILD=3491808469940,KEY_PARENT=24,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551963116834,NODE_ORDER=63,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=25,OID_CHILD=3491808960345,KEY_PARENT=26,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653'  ;

UPDATE NODE SET OID=3551961871812,NODE_ORDER=55,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=27,OID_CHILD=3491808550695,KEY_PARENT=28,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962968424,NODE_ORDER=61,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=29,OID_CHILD=3491808784943,KEY_PARENT=30,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2'  ;

UPDATE NODE SET OID=3551962795027,NODE_ORDER=58,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=31,OID_CHILD=403727116484,KEY_PARENT=32,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9'  ;

UPDATE NODE SET OID=3551963199440,NODE_ORDER=45,ASCENDING=1,VISIBLE=0,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=33,OID_CHILD=403727565528,KEY_PARENT=34,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf'  ;

UPDATE CONTENT SET OID=403727565528,ENABLED=null,MODIFICATION_DATE=null,MAXIMIZABLE=0,PREFIX=null,KEY_INITIAL_CONTENT=null,OID_INITIAL_CONTENT=null,CONTENT_ID='04e440d6-88fc-4cbd-b811-db9058c81ddf',CREATION_DATE='2009-04-30 13:20:51',NAME='pt12:Candidaturasen11:Candidacies',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en11:candidaciespt12:candidaturas',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.Section',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '04e440d6-88fc-4cbd-b811-db9058c81ddf'  ;

UPDATE NODE SET OID=3551938009429,NODE_ORDER=53,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=35,OID_CHILD=3491808473032,KEY_PARENT=36,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962774261,NODE_ORDER=57,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=37,OID_CHILD=3491808581538,KEY_PARENT=38,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39'  ;

UPDATE NODE SET OID=3551963079426,NODE_ORDER=62,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=39,OID_CHILD=403727425516,KEY_PARENT=40,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910'  ;

UPDATE NODE SET OID=3551938009430,NODE_ORDER=54,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=41,OID_CHILD=3491808474450,KEY_PARENT=42,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551938009101,NODE_ORDER=64,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=43,OID_CHILD=403727020472,KEY_PARENT=44,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8'  ;

UPDATE NODE SET OID=3551938009428,NODE_ORDER=52,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=45,OID_CHILD=3491808473031,KEY_PARENT=46,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962877647,NODE_ORDER=60,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=47,OID_CHILD=403727201539,KEY_PARENT=48,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7'  ;

UPDATE NODE SET OID=3551962820628,NODE_ORDER=59,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=49,OID_CHILD=403727142715,KEY_PARENT=50,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(19,'886afcf2-f257-48ac-b489-e3d8fbc7a692','382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(20,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(21,'1c965f56bf473af38edbf0c625648970','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(22,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(23,'2586b648-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(24,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(25,'188631b8-757e-42c5-95db-c5d4b9a3b653','382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(26,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(27,'ce709e5e-1bd7-102b-a709-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(28,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(29,'f9343f47-e942-4ca9-839e-4cffc1fae9a2','382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(30,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(31,'1e68dba1-0f24-40cc-882a-48c774825cd9','382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(32,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(33,'04e440d6-88fc-4cbd-b811-db9058c81ddf','382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(34,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(35,'259fbb84-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(36,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(37,'e36ffab4-3a6a-102b-903e-0016ec912b39','382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(38,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(39,'0f22a384-caef-4572-b2e0-be47545fd910','382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(40,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(41,'25abc654-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(42,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(43,'1db36353c645e064a956e779b64cd4d8','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(44,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(45,'259fb95e-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(46,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(47,'95c341a7-3a0b-4e55-b732-cd90c90266c7','382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(48,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(49,'aac35724-80c2-4b12-a2ab-01e32dfef791','382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(50,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE NODE SET OID=3551962749222,NODE_ORDER=57,ASCENDING=1,VISIBLE=0,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=51,OID_CHILD=403727070283,KEY_PARENT=52,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692'  ;

UPDATE NODE SET OID=3551938009130,NODE_ORDER=47,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=53,OID_CHILD=403727020501,KEY_PARENT=54,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970'  ;

UPDATE NODE SET OID=3551938009427,NODE_ORDER=48,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=55,OID_CHILD=3491808469940,KEY_PARENT=56,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551963116834,NODE_ORDER=64,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=57,OID_CHILD=3491808960345,KEY_PARENT=58,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653'  ;

UPDATE NODE SET OID=3551961871812,NODE_ORDER=56,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=59,OID_CHILD=3491808550695,KEY_PARENT=60,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962968424,NODE_ORDER=62,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=61,OID_CHILD=3491808784943,KEY_PARENT=62,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2'  ;

UPDATE NODE SET OID=3551962795027,NODE_ORDER=59,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=63,OID_CHILD=403727116484,KEY_PARENT=64,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9'  ;

UPDATE NODE SET OID=3551963199440,NODE_ORDER=45,ASCENDING=1,VISIBLE=0,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=65,OID_CHILD=403727565528,KEY_PARENT=66,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf'  ;

UPDATE CONTENT SET OID=403727565528,ENABLED=null,MODIFICATION_DATE=null,MAXIMIZABLE=0,PREFIX=null,KEY_INITIAL_CONTENT=null,OID_INITIAL_CONTENT=null,CONTENT_ID='04e440d6-88fc-4cbd-b811-db9058c81ddf',CREATION_DATE='2009-04-30 13:20:51',NAME='pt12:Candidaturasen11:Candidacies',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en11:candidaciespt12:candidaturas',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.Section',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '04e440d6-88fc-4cbd-b811-db9058c81ddf'  ;

UPDATE NODE SET OID=3551938009429,NODE_ORDER=54,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=67,OID_CHILD=3491808473032,KEY_PARENT=68,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962774261,NODE_ORDER=58,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=69,OID_CHILD=3491808581538,KEY_PARENT=70,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39'  ;

UPDATE NODE SET OID=3551963079426,NODE_ORDER=63,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=71,OID_CHILD=403727425516,KEY_PARENT=72,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910'  ;

UPDATE NODE SET OID=3551938009430,NODE_ORDER=55,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=73,OID_CHILD=3491808474450,KEY_PARENT=74,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551938009101,NODE_ORDER=65,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=75,OID_CHILD=403727020472,KEY_PARENT=76,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8'  ;

UPDATE NODE SET OID=3551938009428,NODE_ORDER=53,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=77,OID_CHILD=3491808473031,KEY_PARENT=78,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET OID=3551962877647,NODE_ORDER=61,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=79,OID_CHILD=403727201539,KEY_PARENT=80,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7'  ;

UPDATE NODE SET OID=3551962820628,NODE_ORDER=60,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',KEY_CHILD=81,OID_CHILD=403727142715,KEY_PARENT=82,OID_PARENT=3487513486524,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337 WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(51,'886afcf2-f257-48ac-b489-e3d8fbc7a692','382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(52,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:886afcf2-f257-48ac-b489-e3d8fbc7a692') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(53,'1c965f56bf473af38edbf0c625648970','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(54,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(55,'2586b648-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(56,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(57,'188631b8-757e-42c5-95db-c5d4b9a3b653','382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(58,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:188631b8-757e-42c5-95db-c5d4b9a3b653') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(59,'ce709e5e-1bd7-102b-a709-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(60,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6dfce709e5e-1bd7-102b-a709-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(61,'f9343f47-e942-4ca9-839e-4cffc1fae9a2','382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(62,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:f9343f47-e942-4ca9-839e-4cffc1fae9a2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(63,'1e68dba1-0f24-40cc-882a-48c774825cd9','382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(64,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1e68dba1-0f24-40cc-882a-48c774825cd9') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(65,'04e440d6-88fc-4cbd-b811-db9058c81ddf','382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(66,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:04e440d6-88fc-4cbd-b811-db9058c81ddf') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(67,'259fbb84-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(68,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(69,'e36ffab4-3a6a-102b-903e-0016ec912b39','382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(70,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6dfe36ffab4-3a6a-102b-903e-0016ec912b39') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(71,'0f22a384-caef-4572-b2e0-be47545fd910','382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(72,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:0f22a384-caef-4572-b2e0-be47545fd910') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(73,'25abc654-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(74,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(75,'1db36353c645e064a956e779b64cd4d8','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(76,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(77,'259fb95e-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(78,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(79,'95c341a7-3a0b-4e55-b732-cd90c90266c7','382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(80,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:95c341a7-3a0b-4e55-b732-cd90c90266c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(81,'aac35724-80c2-4b12-a2ab-01e32dfef791','382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(82,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:aac35724-80c2-4b12-a2ab-01e32dfef791') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO CONTENT (OID,ENABLED,MODIFICATION_DATE,MAXIMIZABLE,PREFIX,KEY_INITIAL_CONTENT,OID_INITIAL_CONTENT,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (403727638923,null,null,null,null,null,null,'b1376da5-42a1-40b1-acc4-4db7da70bbae','2009-06-29 18:26:21','pt17:Programa Doutoralen11:Phd Program',null,null,null,'en11:phd-programpt17:programa-doutoral','net.sourceforge.fenixedu.domain.Section',null,null,null,null,1,1035087118337,null,null)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266634,5,1,0,'04e440d6-88fc-4cbd-b811-db9058c81ddf:b1376da5-42a1-40b1-acc4-4db7da70bbae','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',83,403727638923,84,403727565528,1,1035087118337)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(83,'b1376da5-42a1-40b1-acc4-4db7da70bbae','04e440d6-88fc-4cbd-b811-db9058c81ddf:b1376da5-42a1-40b1-acc4-4db7da70bbae') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(84,'04e440d6-88fc-4cbd-b811-db9058c81ddf','04e440d6-88fc-4cbd-b811-db9058c81ddf:b1376da5-42a1-40b1-acc4-4db7da70bbae') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO CONTENT (OID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (3749507162509,85,8590647686,'21bedab4-44c0-42bc-a422-2542ec13cc86','2009-06-29 18:26:41',null,null,null,null,null,'net.sourceforge.fenixedu.domain.contents.FunctionalityCall',null,null,null,null,1,1035087118337,null,null)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266635,0,1,1,'b1376da5-42a1-40b1-acc4-4db7da70bbae:21bedab4-44c0-42bc-a422-2542ec13cc86','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',86,3749507162509,87,403727638923,1,1035087118337)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(85,'33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','21bedab4-44c0-42bc-a422-2542ec13cc86') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(86,'21bedab4-44c0-42bc-a422-2542ec13cc86','b1376da5-42a1-40b1-acc4-4db7da70bbae:21bedab4-44c0-42bc-a422-2542ec13cc86') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(87,'b1376da5-42a1-40b1-acc4-4db7da70bbae','b1376da5-42a1-40b1-acc4-4db7da70bbae:21bedab4-44c0-42bc-a422-2542ec13cc86') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET OID=3749507162509,KEY_FUNCTIONALITY=88,OID_FUNCTIONALITY=8590647686,CONTENT_ID='21bedab4-44c0-42bc-a422-2542ec13cc86',CREATION_DATE='2009-06-29 18:26:41',NAME='pt6:Acessoen6:Access',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en6:accesspt6:acesso',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '21bedab4-44c0-42bc-a422-2542ec13cc86'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(88,'33c37ec9-fdd0-4302-a5cc-7d2200b1f3d4','21bedab4-44c0-42bc-a422-2542ec13cc86') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO CONTENT (OID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (3749507162510,1,8590647687,'3f7e6dc9-eba3-4cd6-bf42-ea3393affe61','2009-06-29 18:27:41',null,null,null,null,null,'net.sourceforge.fenixedu.domain.contents.FunctionalityCall',null,null,null,null,1,1035087118337,null,null)  ;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266636,1,1,1,'b1376da5-42a1-40b1-acc4-4db7da70bbae:3f7e6dc9-eba3-4cd6-bf42-ea3393affe61','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',2,3749507162510,3,403727638923,1,1035087118337)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(1,'20d49da0-410a-4f09-850a-8d53cbd5ae8e','3f7e6dc9-eba3-4cd6-bf42-ea3393affe61') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(2,'3f7e6dc9-eba3-4cd6-bf42-ea3393affe61','b1376da5-42a1-40b1-acc4-4db7da70bbae:3f7e6dc9-eba3-4cd6-bf42-ea3393affe61') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(3,'b1376da5-42a1-40b1-acc4-4db7da70bbae','b1376da5-42a1-40b1-acc4-4db7da70bbae:3f7e6dc9-eba3-4cd6-bf42-ea3393affe61') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET OID=3749507162510,KEY_FUNCTIONALITY=4,OID_FUNCTIONALITY=8590647687,CONTENT_ID='3f7e6dc9-eba3-4cd6-bf42-ea3393affe61',CREATION_DATE='2009-06-29 18:27:41',NAME='pt16:Recuperar Acessoen15:Recovery Access',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en15:recovery-accesspt16:recuperar-acesso',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '3f7e6dc9-eba3-4cd6-bf42-ea3393affe61'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(4,'20d49da0-410a-4f09-850a-8d53cbd5ae8e','3f7e6dc9-eba3-4cd6-bf42-ea3393affe61') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266637,2,1,1,'b1376da5-42a1-40b1-acc4-4db7da70bbae:05c9ef2a-5217-492a-85bd-d657f1f86dfa','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',5,3749507162511,6,403727638923,1,1035087118337)  ;

INSERT INTO CONTENT (OID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (3749507162511,7,8590647688,'05c9ef2a-5217-492a-85bd-d657f1f86dfa','2009-06-29 18:28:33',null,null,null,null,null,'net.sourceforge.fenixedu.domain.contents.FunctionalityCall',null,null,null,null,1,1035087118337,null,null)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(5,'05c9ef2a-5217-492a-85bd-d657f1f86dfa','b1376da5-42a1-40b1-acc4-4db7da70bbae:05c9ef2a-5217-492a-85bd-d657f1f86dfa') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(6,'b1376da5-42a1-40b1-acc4-4db7da70bbae','b1376da5-42a1-40b1-acc4-4db7da70bbae:05c9ef2a-5217-492a-85bd-d657f1f86dfa') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(7,'3fbcf989-1c06-44cc-b326-4fe018fbbee7','05c9ef2a-5217-492a-85bd-d657f1f86dfa') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

INSERT INTO NODE (OID,NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,OJB_CONCRETE_CLASS,KEY_CHILD,OID_CHILD,KEY_PARENT,OID_PARENT,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT) VALUES (3551963266638,3,1,1,'b1376da5-42a1-40b1-acc4-4db7da70bbae:0fa65393-44b8-460b-b136-dc5fb11452c7','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode',8,3749507162512,9,403727638923,1,1035087118337)  ;

INSERT INTO CONTENT (OID,KEY_FUNCTIONALITY,OID_FUNCTIONALITY,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,OJB_CONCRETE_CLASS,KEY_PORTAL,OID_PORTAL,KEY_AVAILABILITY_POLICY,OID_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,OID_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OID_CREATOR) VALUES (3749507162512,10,8590647689,'0fa65393-44b8-460b-b136-dc5fb11452c7','2009-06-29 18:28:39',null,null,null,null,null,'net.sourceforge.fenixedu.domain.contents.FunctionalityCall',null,null,null,null,1,1035087118337,null,null)  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(8,'0fa65393-44b8-460b-b136-dc5fb11452c7','b1376da5-42a1-40b1-acc4-4db7da70bbae:0fa65393-44b8-460b-b136-dc5fb11452c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(9,'b1376da5-42a1-40b1-acc4-4db7da70bbae','b1376da5-42a1-40b1-acc4-4db7da70bbae:0fa65393-44b8-460b-b136-dc5fb11452c7') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(10,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','0fa65393-44b8-460b-b136-dc5fb11452c7') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET OID=3749507162511,KEY_FUNCTIONALITY=11,OID_FUNCTIONALITY=8590647688,CONTENT_ID='05c9ef2a-5217-492a-85bd-d657f1f86dfa',CREATION_DATE='2009-06-29 18:28:33',NAME='pt9:Submissaoen10:submission',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en10:submissionpt9:submissao',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '05c9ef2a-5217-492a-85bd-d657f1f86dfa'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(11,'3fbcf989-1c06-44cc-b326-4fe018fbbee7','05c9ef2a-5217-492a-85bd-d657f1f86dfa') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET OID=3749507162512,KEY_FUNCTIONALITY=12,OID_FUNCTIONALITY=8590647689,CONTENT_ID='0fa65393-44b8-460b-b136-dc5fb11452c7',CREATION_DATE='2009-06-29 18:28:39',NAME='pt16:Carta Referenciaen12:Referee Form',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='en12:referee-formpt16:carta-referencia',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '0fa65393-44b8-460b-b136-dc5fb11452c7'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(12,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','0fa65393-44b8-460b-b136-dc5fb11452c7') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET OID=3749507162512,KEY_FUNCTIONALITY=13,OID_FUNCTIONALITY=8590647689,CONTENT_ID='0fa65393-44b8-460b-b136-dc5fb11452c7',CREATION_DATE='2009-06-29 18:28:39',NAME='en12:Referee Formpt16:Carta Referencia',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='pt16:carta-referenciaen12:referee-form',OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall',KEY_PORTAL=null,OID_PORTAL=null,KEY_AVAILABILITY_POLICY=null,OID_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,OID_ROOT_DOMAIN_OBJECT=1035087118337,KEY_CREATOR=null,OID_CREATOR=null WHERE CONTENT_ID = '0fa65393-44b8-460b-b136-dc5fb11452c7'  ;

CREATE TEMPORARY TABLE UUID_TEMP_TABLE(COUNTER integer, UUID varchar(255), FROM_UUID varchar(255));

INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(13,'cc27e8df-06ef-4ce3-8c19-68ad2dcc9cae','0fa65393-44b8-460b-b136-dc5fb11452c7') ;
ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PARENT=CT.ID_INTERNAL WHERE T.KEY_PARENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE NODE T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CHILD=CT.ID_INTERNAL WHERE T.KEY_CHILD=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, EXECUTION_PATH CT set T.KEY_EXECUTION_PATH_VALUE=CT.ID_INTERNAL WHERE T.KEY_EXECUTION_PATH_VALUE=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_INITIAL_CONTENT=CT.ID_INTERNAL WHERE T.KEY_INITIAL_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_PORTAL=CT.ID_INTERNAL WHERE T.KEY_PORTAL=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE CONTENT T, UUID_TEMP_TABLE UIT, AVAILABILITY_POLICY CT set T.KEY_AVAILABILITY_POLICY=CT.ID_INTERNAL WHERE T.KEY_AVAILABILITY_POLICY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE AVAILABILITY_POLICY T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_CONTENT=CT.ID_INTERNAL WHERE T.KEY_CONTENT=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
UPDATE EXECUTION_PATH T, UUID_TEMP_TABLE UIT, CONTENT CT set T.KEY_FUNCTIONALITY=CT.ID_INTERNAL WHERE T.KEY_FUNCTIONALITY=UIT.COUNTER AND T.CONTENT_ID = UIT.FROM_UUID AND CT.CONTENT_ID=UIT.UUID;
DROP TABLE UUID_TEMP_TABLE;



COMMIT;
