
START TRANSACTION;

UPDATE NODE SET NODE_ORDER=48,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=47,KEY_CHILD=48,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970'  ;

UPDATE NODE SET NODE_ORDER=46,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2574818a-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=49,KEY_CHILD=50,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2574818a-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=51,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=51,KEY_CHILD=52,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fbb84-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=45,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2553ca76-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=53,KEY_CHILD=54,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2553ca76-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE CONTENT SET ENABLED=null,MODIFICATION_DATE=null,MAXIMIZABLE=0,PREFIX=null,KEY_INITIAL_CONTENT=null,CONTENT_ID='935adf58dae00fce50ed45ad78fb4eed',CREATION_DATE='2008-01-14 20:40:18',NAME='pt13:Investigação ',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='pt13:investigacao-',KEY_ROOT_DOMAIN_OBJECT=1,KEY_AVAILABILITY_POLICY=55,KEY_PORTAL=null,KEY_CREATOR=null,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.Section' WHERE CONTENT_ID = '935adf58dae00fce50ed45ad78fb4eed'  ;

UPDATE NODE SET NODE_ORDER=49,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=56,KEY_CHILD=57,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2586b648-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=41,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:935adf58dae00fce50ed45ad78fb4eed',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=58,KEY_CHILD=59,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:935adf58dae00fce50ed45ad78fb4eed'  ;

UPDATE NODE SET NODE_ORDER=47,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:2574881a-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=60,KEY_CHILD=61,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:2574881a-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=52,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=62,KEY_CHILD=63,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:25abc654-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=46,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=64,KEY_CHILD=65,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8'  ;

UPDATE NODE SET NODE_ORDER=50,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=66,KEY_CHILD=67,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:259fb95e-f86e-102a-aeb6-0013d3b09da0'  ;

UPDATE NODE SET NODE_ORDER=48,ASCENDING=1,VISIBLE=1,CONTENT_ID='382b0734-1431-102b-8308-0016ec91a6df:3936a368-1431-102b-8308-0016ec91a6df',KEY_ROOT_DOMAIN_OBJECT=1,KEY_PARENT=68,KEY_CHILD=69,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' WHERE CONTENT_ID = '382b0734-1431-102b-8308-0016ec91a6df:3936a368-1431-102b-8308-0016ec91a6df'  ;

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(47,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(48,'1c965f56bf473af38edbf0c625648970','382b0734-1431-102b-8308-0016ec91a6df:1c965f56bf473af38edbf0c625648970') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(49,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:2574818a-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(50,'2574818a-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:2574818a-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(51,'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(52,'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(53,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:2553ca76-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(54,'2553ca76-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:2553ca76-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(55,'3440a282-1431-102b-8308-0016ec91a6df','935adf58dae00fce50ed45ad78fb4eed') ;
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,'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(58,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:935adf58dae00fce50ed45ad78fb4eed') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(59,'935adf58dae00fce50ed45ad78fb4eed','382b0734-1431-102b-8308-0016ec91a6df:935adf58dae00fce50ed45ad78fb4eed') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(60,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:2574881a-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(61,'2574881a-f86e-102a-aeb6-0013d3b09da0','382b0734-1431-102b-8308-0016ec91a6df:2574881a-f86e-102a-aeb6-0013d3b09da0') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(62,'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(63,'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(64,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(65,'1db36353c645e064a956e779b64cd4d8','382b0734-1431-102b-8308-0016ec91a6df:1db36353c645e064a956e779b64cd4d8') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(66,'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(67,'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(68,'382b0734-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:3936a368-1431-102b-8308-0016ec91a6df') ;
INSERT INTO UUID_TEMP_TABLE(COUNTER,UUID,FROM_UUID) VALUES(69,'3936a368-1431-102b-8308-0016ec91a6df','382b0734-1431-102b-8308-0016ec91a6df:3936a368-1431-102b-8308-0016ec91a6df') ;
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_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;
DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET EXECUTION_PATH='/editExecutionCourseChooseExDegree.do',VISIBLE=0,KEY_EXECUTION_PATH_VALUE=337,CONTENT_ID='0c2d18d8-a4d8-423b-bc94-80b594c73998',CREATION_DATE='2008-01-14 20:38:27',NAME='pt28:Editar Disciplina Execução 1',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='pt28:editar-disciplina-execucao-1',KEY_ROOT_DOMAIN_OBJECT=1,KEY_AVAILABILITY_POLICY=null,KEY_PORTAL=null,KEY_CREATOR=null,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.functionalities.Functionality' WHERE CONTENT_ID = '0c2d18d8-a4d8-423b-bc94-80b594c73998'  ;

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

ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


DROP TABLE UUID_TEMP_TABLE;

UPDATE CONTENT SET EXECUTION_PATH='/editExecutionCourse.do?method=editExecutionCourse',VISIBLE=0,KEY_EXECUTION_PATH_VALUE=338,CONTENT_ID='be2bc214-0c12-406a-a04e-4ff1b2548776',CREATION_DATE='2008-01-14 20:38:27',NAME='pt28:Editar Disciplina Execução 2',TITLE=null,BODY=null,DESCRIPTION=null,NORMALIZED_NAME='pt28:editar-disciplina-execucao-2',KEY_ROOT_DOMAIN_OBJECT=1,KEY_AVAILABILITY_POLICY=null,KEY_PORTAL=null,KEY_CREATOR=null,OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.functionalities.Functionality' WHERE CONTENT_ID = 'be2bc214-0c12-406a-a04e-4ff1b2548776'  ;

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

ALTER TABLE UUID_TEMP_TABLE ADD INDEX (COUNTER), ADD INDEX (UUID), ADD INDEX (FROM_UUID); 


DROP TABLE UUID_TEMP_TABLE;



COMMIT;
