--  SQL file representing changes to the functionalities model
--  Generated at Fri Apr 27 10:35:28 WEST 2007
--  DO NOT EDIT THIS FILE, run the generating script instead

--  Preamble

START TRANSACTION;

-- 
--  Updating existing functionalities
-- 

--  ID: 116867 UUID: 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6'
UPDATE `ACCESSIBLE_ITEM` AS own SET own.`KEY_AVAILABILITY_POLICY` = NULL WHERE own.`UUID` = 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6';
INSERT INTO `AVAILABILITY_POLICY` (`OJB_CONCRETE_CLASS`, `KEY_ROOT_DOMAIN_OBJECT`, `KEY_ACCESSIBLE_ITEM`, `EXPRESSION`, `TARGET_GROUP`) SELECT 'net.sourceforge.fenixedu.domain.functionalities.ExpressionGroupAvailability', 1, `ID_INTERNAL`, 'ifTrue($I(siteID, \'UnitSite\').showEvents)', 'ifTrue($I(siteID, \'UnitSite\').showEvents)' FROM `ACCESSIBLE_ITEM` WHERE `UUID` = 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6';
UPDATE `ACCESSIBLE_ITEM` AS f, `AVAILABILITY_POLICY` AS ap SET f.`KEY_AVAILABILITY_POLICY` = ap.`ID_INTERNAL` WHERE f.`UUID` = 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6' AND ap.`KEY_ACCESSIBLE_ITEM` = f.`ID_INTERNAL`;

--  ID: 116868 UUID: '8481d1a7-1b95-43f6-b091-e0d582aa86e5'
UPDATE `ACCESSIBLE_ITEM` AS own SET own.`KEY_AVAILABILITY_POLICY` = NULL WHERE own.`UUID` = '8481d1a7-1b95-43f6-b091-e0d582aa86e5';
INSERT INTO `AVAILABILITY_POLICY` (`OJB_CONCRETE_CLASS`, `KEY_ROOT_DOMAIN_OBJECT`, `KEY_ACCESSIBLE_ITEM`, `EXPRESSION`, `TARGET_GROUP`) SELECT 'net.sourceforge.fenixedu.domain.functionalities.ExpressionGroupAvailability', 1, `ID_INTERNAL`, 'ifTrue($I(siteID, \'UnitSite\').showAnnouncements)', 'ifTrue($I(siteID, \'UnitSite\').showAnnouncements)' FROM `ACCESSIBLE_ITEM` WHERE `UUID` = '8481d1a7-1b95-43f6-b091-e0d582aa86e5';
UPDATE `ACCESSIBLE_ITEM` AS f, `AVAILABILITY_POLICY` AS ap SET f.`KEY_AVAILABILITY_POLICY` = ap.`ID_INTERNAL` WHERE f.`UUID` = '8481d1a7-1b95-43f6-b091-e0d582aa86e5' AND ap.`KEY_ACCESSIBLE_ITEM` = f.`ID_INTERNAL`;

--  ID: 116867 UUID: 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6'
UPDATE `ACCESSIBLE_ITEM` AS own SET own.`PATH` = '/manageResearchUnitAnnouncements.do?method=viewEvents' WHERE own.`UUID` = 'e9ab1a2b-cfd2-4c6d-9476-27c7c3caf4c6';

--  ID: 116868 UUID: '8481d1a7-1b95-43f6-b091-e0d582aa86e5'
UPDATE `ACCESSIBLE_ITEM` AS own SET own.`PATH` = '/manageResearchUnitAnnouncements.do?method=viewAnnouncements' WHERE own.`UUID` = '8481d1a7-1b95-43f6-b091-e0d582aa86e5';


COMMIT;
