
START TRANSACTION;

INSERT INTO EXECUTION_PATH (EXECUTION_PATH,CONTENT_ID,KEY_FUNCTIONALITY,KEY_ROOT_DOMAIN_OBJECT) VALUES ('/viewEmployeeAssiduousness.do?method=chooseEmployee&action=showStatus','8a093830-c944-483a-8c64-6cb54f198f4c',1,1)  ;

INSERT INTO CONTENT (EXECUTION_PATH,VISIBLE,KEY_EXECUTION_PATH_VALUE,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,KEY_PORTAL,KEY_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OJB_CONCRETE_CLASS) VALUES ('/viewEmployeeAssiduousness.do?method=chooseEmployee&action=showStatus',null,2,'3682db8e-eda5-4228-9827-5bca153bc92a','2008-05-12 10:49:56','pt6:Status','pt6:Status',null,null,'pt6:status',null,null,1,null,'net.sourceforge.fenixedu.domain.functionalities.Functionality')  ;

INSERT INTO NODE (NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,KEY_CHILD,KEY_PARENT,KEY_ROOT_DOMAIN_OBJECT,OJB_CONCRETE_CLASS) VALUES (6,1,1,'940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a',3,4,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode')  ;

UPDATE EXECUTION_PATH SET EXECUTION_PATH='/viewEmployeeAssiduousness.do?method=chooseEmployee&action=showStatus',CONTENT_ID='8a093830-c944-483a-8c64-6cb54f198f4c',KEY_FUNCTIONALITY=5,KEY_ROOT_DOMAIN_OBJECT=1 WHERE CONTENT_ID = '8a093830-c944-483a-8c64-6cb54f198f4c'  ;

UPDATE CONTENT SET EXECUTION_PATH='/viewEmployeeAssiduousness.do?method=chooseEmployee&action=showStatus',VISIBLE=null,KEY_EXECUTION_PATH_VALUE=6,CONTENT_ID='3682db8e-eda5-4228-9827-5bca153bc92a',CREATION_DATE='2008-05-12 10:49:56',NAME='pt6:Status',TITLE='pt6:Status',BODY=null,DESCRIPTION=null,NORMALIZED_NAME='pt6:status',KEY_PORTAL=null,KEY_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,KEY_CREATOR=null,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.functionalities.Functionality' WHERE CONTENT_ID = '3682db8e-eda5-4228-9827-5bca153bc92a'  ;

UPDATE NODE SET NODE_ORDER=6,ASCENDING=1,VISIBLE=1,CONTENT_ID='940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a',KEY_CHILD=7,KEY_PARENT=8,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a'  ;

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,'3682db8e-eda5-4228-9827-5bca153bc92a','8a093830-c944-483a-8c64-6cb54f198f4c') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(2,'8a093830-c944-483a-8c64-6cb54f198f4c','3682db8e-eda5-4228-9827-5bca153bc92a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(3,'3682db8e-eda5-4228-9827-5bca153bc92a','940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(4,'940d3b34-752c-4e56-8d35-c1dab4f954a8','940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(5,'3682db8e-eda5-4228-9827-5bca153bc92a','8a093830-c944-483a-8c64-6cb54f198f4c') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(6,'8a093830-c944-483a-8c64-6cb54f198f4c','3682db8e-eda5-4228-9827-5bca153bc92a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(7,'3682db8e-eda5-4228-9827-5bca153bc92a','940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(8,'940d3b34-752c-4e56-8d35-c1dab4f954a8','940d3b34-752c-4e56-8d35-c1dab4f954a8:3682db8e-eda5-4228-9827-5bca153bc92a') ;
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 (NODE_ORDER,ASCENDING,VISIBLE,CONTENT_ID,KEY_CHILD,KEY_PARENT,KEY_ROOT_DOMAIN_OBJECT,OJB_CONCRETE_CLASS) VALUES (6,1,1,'90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0',9,10,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode')  ;

INSERT INTO CONTENT (KEY_FUNCTIONALITY,CONTENT_ID,CREATION_DATE,NAME,TITLE,BODY,DESCRIPTION,NORMALIZED_NAME,KEY_PORTAL,KEY_AVAILABILITY_POLICY,KEY_ROOT_DOMAIN_OBJECT,KEY_CREATOR,OJB_CONCRETE_CLASS) VALUES (11,'9295c412-d5c8-4527-9714-c390da2d04d0','2008-05-12 10:51:06',null,null,null,null,null,null,null,1,null,'net.sourceforge.fenixedu.domain.contents.FunctionalityCall')  ;

UPDATE NODE SET NODE_ORDER=6,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0',KEY_CHILD=12,KEY_PARENT=13,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0'  ;

UPDATE CONTENT SET KEY_FUNCTIONALITY=14,CONTENT_ID='9295c412-d5c8-4527-9714-c390da2d04d0',CREATION_DATE='2008-05-12 10:51:06',NAME=null,TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME=null,KEY_PORTAL=null,KEY_AVAILABILITY_POLICY=null,KEY_ROOT_DOMAIN_OBJECT=1,KEY_CREATOR=null,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.FunctionalityCall' WHERE CONTENT_ID = '9295c412-d5c8-4527-9714-c390da2d04d0'  ;

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(9,'9295c412-d5c8-4527-9714-c390da2d04d0','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(10,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(11,'3682db8e-eda5-4228-9827-5bca153bc92a','9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(12,'9295c412-d5c8-4527-9714-c390da2d04d0','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(13,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(14,'3682db8e-eda5-4228-9827-5bca153bc92a','9295c412-d5c8-4527-9714-c390da2d04d0') ;
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 NODE_ORDER=7,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0',KEY_CHILD=15,KEY_PARENT=16,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0'  ;

UPDATE NODE SET NODE_ORDER=6,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:4c9eac8c-13c1-49be-9119-8f2c0c973513',KEY_CHILD=17,KEY_PARENT=18,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:4c9eac8c-13c1-49be-9119-8f2c0c973513'  ;

UPDATE NODE SET NODE_ORDER=1,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:cee30a90-1b15-42b6-96f9-8149ad624d5a',KEY_CHILD=19,KEY_PARENT=20,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:cee30a90-1b15-42b6-96f9-8149ad624d5a'  ;

UPDATE NODE SET NODE_ORDER=5,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:0cf4cba6-0f3f-4da1-a336-b274479ac6f2',KEY_CHILD=21,KEY_PARENT=22,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:0cf4cba6-0f3f-4da1-a336-b274479ac6f2'  ;

UPDATE NODE SET NODE_ORDER=3,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:c6213501-f95d-468c-8761-43bce6fdebea',KEY_CHILD=23,KEY_PARENT=24,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:c6213501-f95d-468c-8761-43bce6fdebea'  ;

UPDATE NODE SET NODE_ORDER=4,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:182704f1-d1be-446f-8de2-12df8be889af',KEY_CHILD=25,KEY_PARENT=26,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:182704f1-d1be-446f-8de2-12df8be889af'  ;

UPDATE NODE SET NODE_ORDER=2,ASCENDING=1,VISIBLE=1,CONTENT_ID='90853396807ee1c33c30f536a898437e:48e76566-47fd-4b59-8597-1f13462f0aef',KEY_CHILD=27,KEY_PARENT=28,KEY_ROOT_DOMAIN_OBJECT=1,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '90853396807ee1c33c30f536a898437e:48e76566-47fd-4b59-8597-1f13462f0aef'  ;

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,'9295c412-d5c8-4527-9714-c390da2d04d0','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(16,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:9295c412-d5c8-4527-9714-c390da2d04d0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(17,'90853396807ee1c33c30f536a898437e:4c9eac8c-13c1-49be-9119-8f2c0c973513','90853396807ee1c33c30f536a898437e:4c9eac8c-13c1-49be-9119-8f2c0c973513') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(18,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:4c9eac8c-13c1-49be-9119-8f2c0c973513') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(19,'90853396807ee1c33c30f536a898437e:cee30a90-1b15-42b6-96f9-8149ad624d5a','90853396807ee1c33c30f536a898437e:cee30a90-1b15-42b6-96f9-8149ad624d5a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(20,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:cee30a90-1b15-42b6-96f9-8149ad624d5a') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(21,'90853396807ee1c33c30f536a898437e:0cf4cba6-0f3f-4da1-a336-b274479ac6f2','90853396807ee1c33c30f536a898437e:0cf4cba6-0f3f-4da1-a336-b274479ac6f2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(22,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:0cf4cba6-0f3f-4da1-a336-b274479ac6f2') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(23,'90853396807ee1c33c30f536a898437e:c6213501-f95d-468c-8761-43bce6fdebea','90853396807ee1c33c30f536a898437e:c6213501-f95d-468c-8761-43bce6fdebea') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(24,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:c6213501-f95d-468c-8761-43bce6fdebea') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(25,'90853396807ee1c33c30f536a898437e:182704f1-d1be-446f-8de2-12df8be889af','90853396807ee1c33c30f536a898437e:182704f1-d1be-446f-8de2-12df8be889af') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(26,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:182704f1-d1be-446f-8de2-12df8be889af') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(27,'90853396807ee1c33c30f536a898437e:48e76566-47fd-4b59-8597-1f13462f0aef','90853396807ee1c33c30f536a898437e:48e76566-47fd-4b59-8597-1f13462f0aef') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(28,'90853396807ee1c33c30f536a898437e','90853396807ee1c33c30f536a898437e:48e76566-47fd-4b59-8597-1f13462f0aef') ;
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;
