Index: openacs-4/packages/forums/sql/oracle/forums-forums-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-forums-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/sql/oracle/forums-forums-drop.sql 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/sql/oracle/forums-forums-drop.sql 22 Sep 2003 21:37:37 -0000 1.2 @@ -12,6 +12,9 @@ -- privileges declare begin + + delete from acs_permissions where privilege in ('forum_moderate','forum_post','forum_read','forum_create','forum_write','forum_delete'); + -- remove children acs_privilege.remove_child('read','forum_read'); acs_privilege.remove_child('create','forum_create'); @@ -38,17 +41,31 @@ -- The Data Model -- +drop view forums_forums_enabled; + drop table forums_forums; -- -- Object Type -- declare + v_object_id integer; begin - acs_object_type.drop_type ( - object_type => 'forums_forum' - ); + + select MAX(object_id) into v_object_id from acs_objects where object_type='forums_forum'; + While (v_object_id > 0) loop + delete from ncanotes where object_id=v_object_id; + acs_object.delete( + v_object_id -- object_id + ); + select MAX(object_id) into v_object_id from acs_objects where object_type='forums_forum'; + End loop; + + acs_object_type.drop_type ( + object_type => 'forums_forum' + ); + end; / show errors Index: openacs-4/packages/forums/sql/oracle/forums-messages-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-messages-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/sql/oracle/forums-messages-drop.sql 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/sql/oracle/forums-messages-drop.sql 22 Sep 2003 21:37:37 -0000 1.2 @@ -31,3 +31,6 @@ end; / show errors + +drop view forums_messages_pending; +drop view forums_messages_approved; \ No newline at end of file Index: openacs-4/packages/forums/sql/oracle/forums-notifications-sanitize.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/Attic/forums-notifications-sanitize.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/sql/oracle/forums-notifications-sanitize.sql 13 Feb 2003 07:25:14 -0000 1.2 +++ openacs-4/packages/forums/sql/oracle/forums-notifications-sanitize.sql 22 Sep 2003 21:37:37 -0000 1.3 @@ -9,13 +9,120 @@ -- declare + v_foo integer; + v_impl_id integer; begin + -- forums_forum + v_impl_id := acs_sc_impl.get_id ( + 'NotificationType', -- impl_contract_name + 'forums_forum_notif_type' -- impl_name + ); + + select type_id into v_foo from notification_types + where sc_impl_id = v_impl_id and short_name = 'forums_forum_notif'; + + delete from notification_types_intervals + where type_id = v_foo + and interval_id in ( + select interval_id + from notification_intervals + where name in ('instant','hourly','daily') + ); + + delete from notification_types_del_methods + where type_id = v_foo + and delivery_method_id in ( + select delivery_method_id + from notification_delivery_methods + where short_name in ('email') + ); + for row in (select type_id - from notification_types - where short_name in ('forums_forum_notif','forums_message_notif')) - loop - notification_type.delete(row.type_id); - end loop; + from notification_types + where short_name in ('forums_forum_notif')) + loop + notification_type.delete(row.type_id); + end loop; + + acs_sc_binding.delete( + contract_name => 'NotificationType', + impl_name => 'forums_forum_notif_type' + ); + + v_foo := acs_sc_impl.delete_alias( + 'NotificationType', + 'forums_forum_notif_type', + 'GetURL' + ); + + v_foo := acs_sc_impl.delete_alias( + 'NotificationType', + 'forums_forum_notif_type', + 'ProcessReply' + ); + + acs_sc_impl.delete( + 'NotificationType', + 'forums_forum_notif_type' + ); + + -- forums_message + v_impl_id := acs_sc_impl.get_id ( + 'NotificationType', -- impl_contract_name + 'forums_message_notif_type' -- impl_name + ); + + select type_id into v_foo from notification_types + where sc_impl_id = v_impl_id and short_name = 'forums_message_notif'; + + delete from notification_types_intervals + where type_id = v_foo + and interval_id in ( + select interval_id + from notification_intervals + where name in ('instant','hourly','daily') + ); + + delete from notification_types_del_methods + where type_id = v_foo + and delivery_method_id in ( + select delivery_method_id + from notification_delivery_methods + where short_name in ('email') + ); + + for row in (select type_id + from notification_types + where short_name in ('forums_message_notif')) + loop + notification_type.delete(row.type_id); + end loop; + + acs_sc_binding.delete( + contract_name => 'NotificationType', + impl_name => 'forums_message_notif_type' + ); + + v_foo := acs_sc_impl.delete_alias( + 'NotificationType', + 'forums_message_notif_type', + 'GetURL' + ); + + v_foo := acs_sc_impl.delete_alias( + 'NotificationType', + 'forums_message_notif_type', + 'ProcessReply' + ); + + acs_sc_impl.delete( + 'NotificationType', + 'forums_message_notif_type' + ); end; / show errors + + + +