Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade--5.9.1d15-5.9.1d16.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade--5.9.1d15-5.9.1d16.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade--5.9.1d15-5.9.1d16.sql 7 Aug 2017 23:47:56 -0000 1.2 +++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade--5.9.1d15-5.9.1d16.sql 3 Sep 2024 15:37:33 -0000 1.3 @@ -1,5 +1,5 @@ -- add extended attribute to rel types -alter table acs_rel_types add column composable_p boolean default 't' not null; +alter table acs_rel_types add composable_p char(1) default 't' not null; update acs_rel_types set composable_p = 'f' where rel_type = 'admin_rel'; create or replace trigger membership_rels_in_tr @@ -9,6 +9,7 @@ v_object_id_one acs_rels.object_id_one%TYPE; v_object_id_two acs_rels.object_id_two%TYPE; v_rel_type acs_rels.rel_type%TYPE; + v_composable_p acs_rel_types.composable_p%TYPE; v_error varchar2(4000); begin @@ -19,7 +20,7 @@ end if; select object_id_one, object_id_two, r.rel_type, composable_p - into v_object_id_one, v_object_id_two, v_rel_type + into v_object_id_one, v_object_id_two, v_rel_type, v_composable_p from acs_rels r join acs_rel_types t on (r.rel_type = t.rel_type) where rel_id = :new.rel_id; @@ -59,6 +60,7 @@ / show errors + create or replace trigger composition_rels_in_tr after insert on composition_rels for each row @@ -133,7 +135,7 @@ -- Add rows for my composable elements - for members in (select distinct member_id, rel_type + for members in (select distinct m.member_id, m.rel_type from group_approved_member_map m join acs_rel_types t on (m.rel_type = t.rel_type) where group_id = v_object_id_two @@ -152,7 +154,7 @@ rel_type, ancestor_rel_type) select distinct map.group_id, element_id, rel_id, container_id, - rel_type, ancestor_rel_type + m.rel_type, ancestor_rel_type from group_element_map m join acs_rel_types t on (m.rel_type = t.rel_type) where group_id = v_object_id_two