      
      select @RootModule:=ROOT_DOMAIN_OBJECT.KEY_ROOT_MODULE from ROOT_DOMAIN_OBJECT;
      select @RootPortal:=ROOT_DOMAIN_OBJECT.KEY_ROOT_PORTAL from ROOT_DOMAIN_OBJECT;
      CREATE TEMPORARY TABLE OLD_PORTAL_INIT(SECTION_ID INTEGER, FUNCTIONALITY_ID INTEGER);
      -- Generating Functionality for: Gestão de Património---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt20:Gestão de Património','pt20:Gestão de Património', NOW(),'0b9447c9-3c30-4712-9883-71e36c4afd94',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='7a8440b9-8a15-4111-a71a-4f4e2ac6fcc8' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='0b9447c9-3c30-4712-9883-71e36c4afd94' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='7a8440b9-8a15-4111-a71a-4f4e2ac6fcc8' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='0b9447c9-3c30-4712-9883-71e36c4afd94'));
      -- Generating Functionality for: Comunicação---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt11:Comunicação','pt11:Comunicação', NOW(),'5c3c81c0-40ad-4e84-9275-28f102a9562b',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9cf56518-f706-4854-b28e-2108ba374c43' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='5c3c81c0-40ad-4e84-9275-28f102a9562b' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='9cf56518-f706-4854-b28e-2108ba374c43' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='5c3c81c0-40ad-4e84-9275-28f102a9562b' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Portal do Candidato---
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt19:Portal do Candidato','pt19:Portal do Candidato', NOW(),'e165b3f2-7461-4bac-829c-6e12bd51bec9',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='eabed4f4-7a0b-4e77-8edb-e8525857f934' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e165b3f2-7461-4bac-829c-6e12bd51bec9' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='eabed4f4-7a0b-4e77-8edb-e8525857f934' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e165b3f2-7461-4bac-829c-6e12bd51bec9'));
      -- Generating Functionality for: Conselho Pedagógico---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt19:Conselho Pedagógico','pt19:Conselho Pedagógico', NOW(),'d68fc498-3078-4443-8430-cb59edb982a8',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='315334e8-bfd5-4d19-b4c2-4097393d7dda' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d68fc498-3078-4443-8430-cb59edb982a8' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='315334e8-bfd5-4d19-b4c2-4097393d7dda' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d68fc498-3078-4443-8430-cb59edb982a8' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Alumni---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt6:Alumni','pt6:Alumni', NOW(),'899f41fa-9d42-48ec-83e2-38658eb50bf3',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ebad2636-7c48-402d-944e-95bc587724be' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='899f41fa-9d42-48ec-83e2-38658eb50bf3' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='ebad2636-7c48-402d-944e-95bc587724be' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='899f41fa-9d42-48ec-83e2-38658eb50bf3' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Investigação---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt12:Investigação','pt12:Investigação', NOW(),'fb3e6d00-375a-464b-9695-cf7e73aa2c4f',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='2fc34f7f-e879-42b7-936a-e9d60db53875' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='fb3e6d00-375a-464b-9695-cf7e73aa2c4f' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='2fc34f7f-e879-42b7-936a-e9d60db53875' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='fb3e6d00-375a-464b-9695-cf7e73aa2c4f' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Gestão de Espaços---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt17:Gestão de Espaços','pt17:Gestão de Espaços', NOW(),'25babbe9-0104-4f16-adf4-655f6ef63e17',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='35fc54d5-7ae9-4195-ad94-be98894ce012' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='25babbe9-0104-4f16-adf4-655f6ef63e17' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='35fc54d5-7ae9-4195-ad94-be98894ce012' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='25babbe9-0104-4f16-adf4-655f6ef63e17' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Bolonha---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt7:Bolonha','pt7:Bolonha', NOW(),'788948a5-468a-45b4-b8ff-77bdcf03707b',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='353e875a-75c6-40c9-92bf-88de23686f08' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='788948a5-468a-45b4-b8ff-77bdcf03707b' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='353e875a-75c6-40c9-92bf-88de23686f08' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='788948a5-468a-45b4-b8ff-77bdcf03707b' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Projectos Institucionais---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt24:Projectos Institucionais','pt24:Projectos Institucionais', NOW(),'528bc9a7-5cb2-452e-81ba-5363c2e02bfa',1,1,'/institucionalProjectIndex.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e5325cd5-5fd1-4213-af66-42fc9ed00892' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='528bc9a7-5cb2-452e-81ba-5363c2e02bfa' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='e5325cd5-5fd1-4213-af66-42fc9ed00892' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='528bc9a7-5cb2-452e-81ba-5363c2e02bfa' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Projectos---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt9:Projectos','pt9:Projectos', NOW(),'eac5f0d0-3e77-45d1-82ba-d0246157c909',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='20ae78b6-6c5a-4705-b5f5-e233862178ca' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='eac5f0d0-3e77-45d1-82ba-d0246157c909' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='20ae78b6-6c5a-4705-b5f5-e233862178ca' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='eac5f0d0-3e77-45d1-82ba-d0246157c909' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Delegado---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt8:Delegado','pt8:Delegado', NOW(),'9502b723-7161-4bb9-8779-1463d7e72f5e',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d63322ea-b9c3-402a-85b1-07577df66635' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9502b723-7161-4bb9-8779-1463d7e72f5e' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='d63322ea-b9c3-402a-85b1-07577df66635' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9502b723-7161-4bb9-8779-1463d7e72f5e' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Conselho Directivo---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt18:Conselho Directivo','pt18:Conselho Directivo', NOW(),'d87f9867-bf62-4883-9941-535abb0aa746',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='fcf57231-df5b-4173-8db3-46bf9676ef9f' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d87f9867-bf62-4883-9941-535abb0aa746' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='fcf57231-df5b-4173-8db3-46bf9676ef9f' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d87f9867-bf62-4883-9941-535abb0aa746' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Gabinete de Estudos e Planeamento---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt33:Gabinete de Estudos e Planeamento','pt33:Gabinete de Estudos e Planeamento', NOW(),'8edf4dac-9b77-4648-a7c3-54e52c31a6e6',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='30316818-7aaf-4b0c-a770-6ac47463fd09' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='8edf4dac-9b77-4648-a7c3-54e52c31a6e6' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='30316818-7aaf-4b0c-a770-6ac47463fd09' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='8edf4dac-9b77-4648-a7c3-54e52c31a6e6' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Secretaria de Departamento---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt26:Secretaria de Departamento','pt26:Secretaria de Departamento', NOW(),'cc54b6f0-1f70-497b-b49f-0045745aafcb',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='615aa695-c4e3-445c-b63b-7ea40768b4f9' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='cc54b6f0-1f70-497b-b49f-0045745aafcb' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='615aa695-c4e3-445c-b63b-7ea40768b4f9' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='cc54b6f0-1f70-497b-b49f-0045745aafcb' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Bolseiro---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt8:Bolseiro','pt8:Bolseiro', NOW(),'c7c443f1-f837-4c80-af88-992571999919',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='97805947-1f30-4780-8fc6-ee283514f534' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c7c443f1-f837-4c80-af88-992571999919' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='97805947-1f30-4780-8fc6-ee283514f534' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c7c443f1-f837-4c80-af88-992571999919' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Seminários---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt10:Seminários','pt10:Seminários', NOW(),'7754f6aa-1672-4003-829d-aa3c4476e449',1,1,'/seminariesIndex.jsp','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='264b6a46-3a52-4935-9094-88be1fbfb33d' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='7754f6aa-1672-4003-829d-aa3c4476e449' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='264b6a46-3a52-4935-9094-88be1fbfb33d' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='7754f6aa-1672-4003-829d-aa3c4476e449' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Operador---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt8:Operador','pt8:Operador', NOW(),'f6ec4338-03f7-4311-9253-1a82709f8f08',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ec219d83-2928-4c5f-84ea-28768c22d5bd' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='f6ec4338-03f7-4311-9253-1a82709f8f08' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='ec219d83-2928-4c5f-84ea-28768c22d5bd' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='f6ec4338-03f7-4311-9253-1a82709f8f08' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Conselho Científico---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt19:Conselho Científico','pt19:Conselho Científico', NOW(),'1d6877ab-e627-444e-a06e-06d19e77be35',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='b5d85b58-d775-4fca-8f0c-30e2fdb60cba' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='1d6877ab-e627-444e-a06e-06d19e77be35' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='b5d85b58-d775-4fca-8f0c-30e2fdb60cba' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='1d6877ab-e627-444e-a06e-06d19e77be35' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Portal de Serviços de Graduação - Super Utilizador---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt50:Portal de Serviços de Graduação - Super Utilizador','pt50:Portal de Serviços de Graduação - Super Utilizador', NOW(),'1b44b7cb-e1f8-432d-99cf-f6e4cb82cf95',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='64d01274-211d-49c1-b1ed-aa07a368efd2' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='1b44b7cb-e1f8-432d-99cf-f6e4cb82cf95' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='64d01274-211d-49c1-b1ed-aa07a368efd2' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='1b44b7cb-e1f8-432d-99cf-f6e4cb82cf95' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Administração de créditos de docentes do departamento---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt53:Administração de créditos de docentes do departamento','pt53:Administração de créditos de docentes do departamento', NOW(),'7e6ecc9e-0715-49ee-a184-7b1b596f1260',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='05edef46-6c85-4361-b35e-017d73f9bd6c' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='7e6ecc9e-0715-49ee-a184-7b1b596f1260' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='05edef46-6c85-4361-b35e-017d73f9bd6c' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='7e6ecc9e-0715-49ee-a184-7b1b596f1260' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Secção de Pessoal Docente e Investigador---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt40:Secção de Pessoal Docente e Investigador','pt40:Secção de Pessoal Docente e Investigador', NOW(),'9cf98c03-d05f-423c-a1f8-f60ea7964f7f',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='63bb3ae4-d1a0-4fc7-be16-ae25918a8831' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9cf98c03-d05f-423c-a1f8-f60ea7964f7f' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='63bb3ae4-d1a0-4fc7-be16-ae25918a8831' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9cf98c03-d05f-423c-a1f8-f60ea7964f7f' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Portal de Serviços de Graduação---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt31:Portal de Serviços de Graduação','pt31:Portal de Serviços de Graduação', NOW(),'f66c6357-e28c-43dd-a839-940871039dea',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9ba1269a-0b8f-4daa-bde2-abbd0132327b' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='f66c6357-e28c-43dd-a839-940871039dea' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='9ba1269a-0b8f-4daa-bde2-abbd0132327b' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='f66c6357-e28c-43dd-a839-940871039dea' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Funcionário---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt11:Funcionário','pt11:Funcionário', NOW(),'c9b31d0f-7fd6-417f-b63b-e8e3caa8d525',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='232d33c1-c50a-418b-a61f-c652539b90cf' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c9b31d0f-7fd6-417f-b63b-e8e3caa8d525' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='232d33c1-c50a-418b-a61f-c652539b90cf' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c9b31d0f-7fd6-417f-b63b-e8e3caa8d525' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Coordenador---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt11:Coordenador','pt11:Coordenador', NOW(),'c1761f13-6099-4f3c-b6de-a9f237be28eb',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='85ce6f13-fddd-44dd-941e-25a1c2dd857e' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c1761f13-6099-4f3c-b6de-a9f237be28eb' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='85ce6f13-fddd-44dd-941e-25a1c2dd857e' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='c1761f13-6099-4f3c-b6de-a9f237be28eb' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Portal de Serviços de Pós-Graduação---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt35:Portal de Serviços de Pós-Graduação','pt35:Portal de Serviços de Pós-Graduação', NOW(),'ba4543cc-07e6-4d36-8a59-9ae2be20844a',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ffa828bb-e3d5-4b3d-9996-39b4cb226ba8' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ba4543cc-07e6-4d36-8a59-9ae2be20844a' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='ffa828bb-e3d5-4b3d-9996-39b4cb226ba8' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ba4543cc-07e6-4d36-8a59-9ae2be20844a' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Portal do Candidato a Pós-Graduações---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt36:Portal do Candidato a Pós-Graduações','pt36:Portal do Candidato a Pós-Graduações', NOW(),'4b046b05-efab-4234-b8ad-d56206b64827',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='9f33514d-c6c3-4acb-b1ca-a02980128d90' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='4b046b05-efab-4234-b8ad-d56206b64827' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='9f33514d-c6c3-4acb-b1ca-a02980128d90' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='4b046b05-efab-4234-b8ad-d56206b64827' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Gestão de Recursos---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt18:Gestão de Recursos','pt18:Gestão de Recursos', NOW(),'791b7e6a-7fd9-4795-8998-7200eeea4445',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='6a97cab2-491d-4e9f-a876-3a15d1d1033f' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='791b7e6a-7fd9-4795-8998-7200eeea4445' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='6a97cab2-491d-4e9f-a876-3a15d1d1033f' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='791b7e6a-7fd9-4795-8998-7200eeea4445' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Departamento---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt12:Departamento','pt12:Departamento', NOW(),'8b5d55ce-7cc8-4439-bc74-7ff67c214584',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='123c9a8e-de47-4b4f-9543-a38116c03b54' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='8b5d55ce-7cc8-4439-bc74-7ff67c214584' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='123c9a8e-de47-4b4f-9543-a38116c03b54' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='8b5d55ce-7cc8-4439-bc74-7ff67c214584' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Docência---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt8:Docência','pt8:Docência', NOW(),'25b139a3-19e6-446b-b190-74e4caaaac6d',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d30ed02d-2d26-4736-8e14-4184595cedd5' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='25b139a3-19e6-446b-b190-74e4caaaac6d' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='d30ed02d-2d26-4736-8e14-4184595cedd5' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='25b139a3-19e6-446b-b190-74e4caaaac6d' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Estudante---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt9:Estudante','pt9:Estudante', NOW(),'d58a7532-895a-4950-b433-a950c7b73129',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='6e83db7e-efb1-4e2f-9127-3b5e6ca05904' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d58a7532-895a-4950-b433-a950c7b73129' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='6e83db7e-efb1-4e2f-9127-3b5e6ca05904' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d58a7532-895a-4950-b433-a950c7b73129' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Pessoal---
      
      
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt7:Pessoal','pt7:Pessoal', NOW(),'56beb72a-7c1d-459a-b742-57f530ee8eae',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
      
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='ca8c9543-646b-4706-8465-f41345cfadf2' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='56beb72a-7c1d-459a-b742-57f530ee8eae' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='ca8c9543-646b-4706-8465-f41345cfadf2' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='56beb72a-7c1d-459a-b742-57f530ee8eae' GROUP BY CONTENT_ID));
      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING,OJB_CONCRETE_CLASS)SELECT SECTION_ID, FUNCTIONALITY_ID, '1','1','1','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' FROM OLD_PORTAL_INIT;

    -- Generating Functionality for: Gestão do WebSite---


      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt17:Gestão do WebSite','pt17:Gestão do WebSite', NOW(),'d741fdcd-fba8-4e4a-b261-9c31ab6df969',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');

      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='421011e0-fadc-102a-b5ba-0013d3b09da0' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d741fdcd-fba8-4e4a-b261-9c31ab6df969' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');

      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='421011e0-fadc-102a-b5ba-0013d3b09da0' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='d741fdcd-fba8-4e4a-b261-9c31ab6df969' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Estacionamento---


      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt14:Estacionamento','pt14:Estacionamento', NOW(),'a6ef746f-b64a-48d6-bc6c-2fe2e02c514e',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');

      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='452f211a-fada-102a-b5ba-0013d3b09da0' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='a6ef746f-b64a-48d6-bc6c-2fe2e02c514e' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');

      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='452f211a-fada-102a-b5ba-0013d3b09da0' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='a6ef746f-b64a-48d6-bc6c-2fe2e02c514e' GROUP BY CONTENT_ID));



  	 -- Generating Functionality for: Secção de Pessoal---
     
      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt17:Secção de Pessoal','pt17:Secção de Pessoal', NOW(),'a21411a5-f2d0-4c53-a4ab-8157f26ebb30',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');
     
    update NODE set NODE_ORDER=NODE_ORDER+1 WHERE KEY_PARENT=(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='36496cce-ebc4-4a27-b16e-a408672f0bf6');

     insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='36496cce-ebc4-4a27-b16e-a408672f0bf6' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='a21411a5-f2d0-4c53-a4ab-8157f26ebb30' GROUP BY CONTENT_ID),0,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');
      
     insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='36496cce-ebc4-4a27-b16e-a408672f0bf6' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='a21411a5-f2d0-4c53-a4ab-8157f26ebb30' GROUP BY CONTENT_ID));

      -- Generating Functionality for: Secretaria Académica---


      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt20:Secretaria Académica','pt20:Secretaria Académica', NOW(),'6d68667f-11e0-4992-acf2-9fda2ad6f317',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');

      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='3d30565c-fb8c-102a-b5ba-0013d3b09da0' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='6d68667f-11e0-4992-acf2-9fda2ad6f317' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');

      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='3d30565c-fb8c-102a-b5ba-0013d3b09da0' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='6d68667f-11e0-4992-acf2-9fda2ad6f317' GROUP BY CONTENT_ID));
      -- Generating Functionality for: Avaliação---


      insert into CONTENT(NAME,TITLE,CREATION_DATE,CONTENT_ID,ENABLED,VISIBLE,EXECUTION_PATH,OJB_CONCRETE_CLASS)VALUES('pt9:Avaliação','pt9:Avaliação', NOW(),'e4ec700e-1782-4b19-8892-987c18f4ff44',1,1,'/index.do','net.sourceforge.fenixedu.domain.functionalities.Functionality');

      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING, OJB_CONCRETE_CLASS) values((SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e0181ae0-fb8b-102a-b5ba-0013d3b09da0' GROUP BY CONTENT_ID), (SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e4ec700e-1782-4b19-8892-987c18f4ff44' GROUP BY CONTENT_ID),1,1,1,'net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode');

      insert into OLD_PORTAL_INIT(SECTION_ID, FUNCTIONALITY_ID) VALUES((SELECT C.ID_INTERNAL FROM CONTENT C, CONTENT C2, NODE N, NODE N2 WHERE C.OJB_CONCRETE_CLASS LIKE '%Section' AND C2.CONTENT_ID='e0181ae0-fb8b-102a-b5ba-0013d3b09da0' AND C.NAME=C2.NAME AND N.KEY_CHILD = C.ID_INTERNAL AND N2.KEY_CHILD = C2.ID_INTERNAL AND N.KEY_PARENT=@RootPortal AND N2.KEY_PARENT=@RootModule GROUP BY C.CONTENT_ID),(SELECT ID_INTERNAL FROM CONTENT WHERE CONTENT_ID='e4ec700e-1782-4b19-8892-987c18f4ff44' GROUP BY CONTENT_ID));

      insert into NODE(KEY_PARENT,KEY_CHILD,NODE_ORDER,VISIBLE,ASCENDING,OJB_CONCRETE_CLASS)SELECT SECTION_ID, FUNCTIONALITY_ID, '1','1','1','net.sourceforge.fenixedu.domain.contents.ExplicitOrderNode' FROM OLD_PORTAL_INIT;

      DROP TEMPORARY TABLE OLD_PORTAL_INIT;

