UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = NULL;

DELETE FROM `AVAILABILITY_POLICY`;

ALTER TABLE `AVAILABILITY_POLICY` MODIFY COLUMN `ID_INTERNAL` INTEGER NOT NULL 
  AUTO_INCREMENT, 
  ADD PRIMARY KEY(`ID_INTERNAL`);

INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (1,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(PERSON)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (2,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(STUDENT)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (3,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(TEACHER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (4,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DEPARTMENT_MEMBER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (5,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(TIME_TABLE_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (6,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(MASTER_DEGREE_CANDIDATE)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (7,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(MASTER_DEGREE_ADMINISTRATIVE_OFFICE)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (8,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(TREASURY)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (9,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(COORDINATOR)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (10,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(EMPLOYEE)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (11,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(MANAGEMENT_ASSIDUOUSNESS)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (12,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(MANAGER)");
-- Changed expression to allow the super user to access the same functionalities as the regular user
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (13,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DEGREE_ADMINISTRATIVE_OFFICE) || role(DEGREE_ADMINISTRATIVE_OFFICE_SUPER_USER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (14,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(CREDITS_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (15,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DEPARTMENT_CREDITS_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (16,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DEGREE_ADMINISTRATIVE_OFFICE_SUPER_USER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (17,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(SCIENTIFIC_COUNCIL)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (18,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(OPERATOR)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (19,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(SEMINARIES_COORDINATOR)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (20,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(GRANT_OWNER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (21,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(GRANT_OWNER_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (22,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DEPARTMENT_ADMINISTRATIVE_OFFICE)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (23,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(GEP)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (24,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DIRECTIVE_COUNCIL)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (25,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(DELEGATE)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (26,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(PROJECTS_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (27,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(INSTITUCIONAL_PROJECTS_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (28,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(BOLONHA_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (29,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(SPACE_MANAGER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (30,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(RESEARCHER)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (31,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(ALUMNI)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (32,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(PEDAGOGICAL_COUNCIL)");
INSERT INTO AVAILABILITY_POLICY (ID_INTERNAL, OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_FUNCTIONALITY, EXPRESSION) VALUES (33,"net.sourceforge.fenixedu.domain.functionalities.GroupAvailability",1,0,"role(CANDIDATE)");

UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 1 WHERE UUID = "ca8c9543-646b-4706-8465-f41345cfadf2";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 2 WHERE UUID = "6e83db7e-efb1-4e2f-9127-3b5e6ca05904";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 3 WHERE UUID = "d30ed02d-2d26-4736-8e14-4184595cedd5";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 4 WHERE UUID = "123c9a8e-de47-4b4f-9543-a38116c03b54";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 5 WHERE UUID = "6a97cab2-491d-4e9f-a876-3a15d1d1033f";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 6 WHERE UUID = "9f33514d-c6c3-4acb-b1ca-a02980128d90";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 7 WHERE UUID = "ffa828bb-e3d5-4b3d-9996-39b4cb226ba8";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 8 WHERE UUID = "3cc0ecf4-b897-48d7-925c-af865f028b9b";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 9 WHERE UUID = "85ce6f13-fddd-44dd-941e-25a1c2dd857e";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 10 WHERE UUID = "232d33c1-c50a-418b-a61f-c652539b90cf";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 11 WHERE UUID = "36496cce-ebc4-4a27-b16e-a408672f0bf6";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 12 WHERE UUID = "4d6686aa-9e47-4a47-a08a-a37d69f94eb5";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 13 WHERE UUID = "9ba1269a-0b8f-4daa-bde2-abbd0132327b";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 14 WHERE UUID = "63bb3ae4-d1a0-4fc7-be16-ae25918a8831";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 15 WHERE UUID = "05edef46-6c85-4361-b35e-017d73f9bd6c";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 16 WHERE UUID = "64d01274-211d-49c1-b1ed-aa07a368efd2";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 17 WHERE UUID = "b5d85b58-d775-4fca-8f0c-30e2fdb60cba";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 18 WHERE UUID = "ec219d83-2928-4c5f-84ea-28768c22d5bd";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 19 WHERE UUID = "264b6a46-3a52-4935-9094-88be1fbfb33d";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 20 WHERE UUID = "97805947-1f30-4780-8fc6-ee283514f534";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 21 WHERE UUID = "2375facd-190c-49f0-a011-9350502e6e54";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 22 WHERE UUID = "615aa695-c4e3-445c-b63b-7ea40768b4f9";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 23 WHERE UUID = "30316818-7aaf-4b0c-a770-6ac47463fd09";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 24 WHERE UUID = "fcf57231-df5b-4173-8db3-46bf9676ef9f";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 25 WHERE UUID = "d63322ea-b9c3-402a-85b1-07577df66635";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 26 WHERE UUID = "20ae78b6-6c5a-4705-b5f5-e233862178ca";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 27 WHERE UUID = "e5325cd5-5fd1-4213-af66-42fc9ed00892";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 28 WHERE UUID = "353e875a-75c6-40c9-92bf-88de23686f08";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 29 WHERE UUID = "35fc54d5-7ae9-4195-ad94-be98894ce012";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 30 WHERE UUID = "2fc34f7f-e879-42b7-936a-e9d60db53875";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 31 WHERE UUID = "ebad2636-7c48-402d-944e-95bc587724be";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 32 WHERE UUID = "315334e8-bfd5-4d19-b4c2-4097393d7dda";
UPDATE FUNCTIONALITY SET KEY_AVAILABILITY_POLICY = 33 WHERE UUID = "eabed4f4-7a0b-4e77-8edb-e8525857f934";

UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "ca8c9543-646b-4706-8465-f41345cfadf2";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "6e83db7e-efb1-4e2f-9127-3b5e6ca05904";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "d30ed02d-2d26-4736-8e14-4184595cedd5";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "123c9a8e-de47-4b4f-9543-a38116c03b54";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "6a97cab2-491d-4e9f-a876-3a15d1d1033f";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "6a97cab2-491d-4e9f-a876-3a15d1d1033f";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "ffa828bb-e3d5-4b3d-9996-39b4cb226ba8";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "3cc0ecf4-b897-48d7-925c-af865f028b9b";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "85ce6f13-fddd-44dd-941e-25a1c2dd857e";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "232d33c1-c50a-418b-a61f-c652539b90cf";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "36496cce-ebc4-4a27-b16e-a408672f0bf6";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "4d6686aa-9e47-4a47-a08a-a37d69f94eb5";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "9ba1269a-0b8f-4daa-bde2-abbd0132327b";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "63bb3ae4-d1a0-4fc7-be16-ae25918a8831";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "05edef46-6c85-4361-b35e-017d73f9bd6c";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "64d01274-211d-49c1-b1ed-aa07a368efd2";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "b5d85b58-d775-4fca-8f0c-30e2fdb60cba";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "ec219d83-2928-4c5f-84ea-28768c22d5bd";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "264b6a46-3a52-4935-9094-88be1fbfb33d";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "97805947-1f30-4780-8fc6-ee283514f534";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "2375facd-190c-49f0-a011-9350502e6e54";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "615aa695-c4e3-445c-b63b-7ea40768b4f9";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "30316818-7aaf-4b0c-a770-6ac47463fd09";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "fcf57231-df5b-4173-8db3-46bf9676ef9f";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "d63322ea-b9c3-402a-85b1-07577df66635";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "20ae78b6-6c5a-4705-b5f5-e233862178ca";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "e5325cd5-5fd1-4213-af66-42fc9ed00892";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "353e875a-75c6-40c9-92bf-88de23686f08";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "35fc54d5-7ae9-4195-ad94-be98894ce012";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "2fc34f7f-e879-42b7-936a-e9d60db53875";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "ebad2636-7c48-402d-944e-95bc587724be";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "315334e8-bfd5-4d19-b4c2-4097393d7dda";
UPDATE AVAILABILITY_POLICY AS ap, FUNCTIONALITY AS f SET ap.KEY_FUNCTIONALITY = f.ID_INTERNAL WHERE f.UUID = "eabed4f4-7a0b-4e77-8edb-e8525857f934";
