Index: openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql 15 Nov 2001 01:47:13 -0000 1.2 +++ openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql 9 Mar 2002 23:47:53 -0000 1.2.2.1 @@ -3,7 +3,6 @@ -- certainly needs to be modified !! -delete from cr_item_publish_audit; -- ?? delete from cr_folder_type_map @@ -22,7 +21,6 @@ begin for c in v_attach_cursor loop - update acs_objects set context_id = null where context_id = c.item_id; content_item.delete(c.item_id); end loop; @@ -90,22 +88,18 @@ begin for c in v_slide_clob_cursor loop - update acs_objects set context_id = null where context_id = c.item_id; content_item.delete(c.item_id); end loop; for c in v_slide_cursor loop - update acs_objects set context_id = null where context_id = c.item_id; content_item.delete(c.item_id); end loop; for c in v_pres_clob_cursor loop - update acs_objects set context_id = null where context_id = c.item_id; content_item.delete(c.item_id); end loop; for c in v_pres_cursor loop - update acs_objects set context_id = null where context_id = c.item_id; content_item.delete(c.item_id); end loop; Index: openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 15 Nov 2001 01:47:13 -0000 1.2 +++ openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 9 Mar 2002 23:47:53 -0000 1.2.2.1 @@ -4,7 +4,8 @@ -- certainly needs to be modified !! -delete from cr_item_publish_audit; +-- DaveB content_item__delete should take care of this +-- delete from cr_item_publish_audit; delete from cr_folder_type_map @@ -20,7 +21,8 @@ for del_rec in select item_id from cr_items where content_type in (''cr_wp_file_attachment'', ''cr_wp_image_attachment'') loop - update acs_objects set context_id = null where context_id = del_rec.item_id; +-- DaveB this causes an RI error, and it works without it +-- update acs_objects set context_id = null where context_id = del_rec.item_id; PERFORM content_item__delete(del_rec.item_id); end loop; return 0; @@ -104,17 +106,19 @@ ''cr_wp_slide_bullet_items'' ) loop - update acs_objects set context_id = null - where context_id = del_rec_a.item_id; +-- DaveB this causes an RI error, and it works without it +-- update acs_objects set context_id = null +-- where context_id = del_rec_a.item_id; PERFORM content_item__delete(del_rec_a.item_id); end loop; for del_rec_b in select item_id from cr_items where content_type = ''cr_wp_slide'' loop - update acs_objects set context_id = null - where context_id = del_rec_b.item_id; +-- DaveB this causes an RI error, and it works without it +-- update acs_objects set context_id = null +-- where context_id = del_rec_b.item_id; PERFORM content_item__delete(del_rec_b.item_id); end loop; @@ -124,17 +128,19 @@ ''cr_wp_presentation_aud'', ''cr_wp_presentation_back'') loop - update acs_objects set context_id = null - where context_id = del_rec_c.item_id; +-- DaveB this causes an RI error, and it works without it +-- update acs_objects set context_id = null +-- where context_id = del_rec_c.item_id; PERFORM content_item__delete(del_rec_c.item_id); end loop; for del_rec_d in select item_id from cr_items where content_type = ''cr_wp_presentation'' loop - update acs_objects set context_id = null - where context_id = del_rec_d.item_id; +-- DaveB this causes an RI error, and it works without it +-- update acs_objects set context_id = null +-- where context_id = del_rec_d.item_id; PERFORM content_item__delete(del_rec_d.item_id); end loop; @@ -412,7 +418,8 @@ boolean, boolean, varchar, - varchar + varchar, + integer ); DROP FUNCTION wp_presentation__delete_audience(