Index: openacs-4/packages/search/sql/oracle/search-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/search/sql/oracle/search-packages-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/search/sql/oracle/search-packages-create.sql	8 Nov 2005 18:24:06 -0000	1.3
+++ openacs-4/packages/search/sql/oracle/search-packages-create.sql	31 Aug 2006 07:31:29 -0000	1.4
@@ -239,228 +239,230 @@
 /
 show errors
 
+-- TRIGGERS SHOULD GO IN THEIR OWN PACKAGE --
+
 --------------------------------------------------------
 -- Forum triggers and procedures
 
-create or replace trigger forums_messages_sws_insert_tr
-  after insert on forums_messages for each row
-begin
-  site_wide_search.register_event (:new.message_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger forums_messages_sws_insert_tr
+--   after insert on forums_messages for each row
+-- begin
+--   site_wide_search.register_event (:new.message_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger forums_messages_sws_update_tr
-  after update on forums_messages for each row
-begin
-  site_wide_search.register_event (:new.message_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger forums_messages_sws_update_tr
+--   after update on forums_messages for each row
+-- begin
+--   site_wide_search.register_event (:new.message_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
     
-create or replace trigger forums_messages_sws_delete_tr
-  after delete on forums_messages for each row
-begin
-  site_wide_search.register_event (:new.message_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger forums_messages_sws_delete_tr
+--   after delete on forums_messages for each row
+-- begin
+--   site_wide_search.register_event (:new.message_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 
 --------------------------------------------------------
 -- static-portal triggers and procedures
 
-create or replace trigger static_portal_sws_insert_tr
-  after insert on static_portal_content for each row
-begin
-  site_wide_search.register_event (:new.content_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger static_portal_sws_insert_tr
+--   after insert on static_portal_content for each row
+-- begin
+--   site_wide_search.register_event (:new.content_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger static_portal_sws_update_tr
-  after update on static_portal_content for each row
-begin
-  site_wide_search.register_event (:new.content_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger static_portal_sws_update_tr
+--   after update on static_portal_content for each row
+-- begin
+--   site_wide_search.register_event (:new.content_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
     
-create or replace trigger static_portal_sws_delete_tr
-  after delete on static_portal_content for each row
-begin
-  site_wide_search.register_event (:new.content_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger static_portal_sws_delete_tr
+--   after delete on static_portal_content for each row
+-- begin
+--   site_wide_search.register_event (:new.content_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- ACS-events triggers and procedures
 -- I think only calendar makes use of the acs-events tables.
 
-create or replace trigger acs_events_sws_insert_tr
-  after insert on acs_events for each row
-begin
-  site_wide_search.register_event (:new.event_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger acs_events_sws_insert_tr
+--   after insert on acs_events for each row
+-- begin
+--   site_wide_search.register_event (:new.event_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger acs_events_sws_update_tr
-  after update on acs_events for each row
-begin
-  site_wide_search.register_event (:new.event_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger acs_events_sws_update_tr
+--   after update on acs_events for each row
+-- begin
+--   site_wide_search.register_event (:new.event_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
     
-create or replace trigger acs_events_sws_delete_tr
-  after delete on acs_events for each row
-begin
-  site_wide_search.register_event (:new.event_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger acs_events_sws_delete_tr
+--   after delete on acs_events for each row
+-- begin
+--   site_wide_search.register_event (:new.event_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- FAQ triggers and procedures
 
-create or replace trigger faq_q_and_as_sws_insert_tr
-  after insert on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.entry_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_insert_tr
+--   after insert on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.entry_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger faq_q_and_as_sws_update_tr
-  after update on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.entry_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_update_tr
+--   after update on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.entry_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
     
-create or replace trigger faq_q_and_as_sws_delete_tr
-  after delete on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.entry_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_delete_tr
+--   after delete on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.entry_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 
 --------------------------------------------------------
 -- Survey Procs
 
-create or replace trigger surveys_sws_insert_tr
-  after insert on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_insert_tr
+--   after insert on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger surveys_sws_update_tr
-  after update on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_update_tr
+--   after update on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
 
     
-create or replace trigger surveys_sws_delete_tr
-  after delete on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_delete_tr
+--   after delete on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- Photobook Procs
 
-create or replace trigger phb_person_sws_insert_tr
-  after insert on phb_person for each row
-begin
-  site_wide_search.register_event (:new.person_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger phb_person_sws_insert_tr
+--   after insert on phb_person for each row
+-- begin
+--   site_wide_search.register_event (:new.person_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger phb_person_sws_update_tr
-  after update on phb_person for each row
-begin
-  site_wide_search.register_event (:new.person_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger phb_person_sws_update_tr
+--   after update on phb_person for each row
+-- begin
+--   site_wide_search.register_event (:new.person_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
 
     
-create or replace trigger phb_person_sws_delete_tr
-  after delete on phb_person for each row
-begin
-  site_wide_search.register_event (:new.person_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger phb_person_sws_delete_tr
+--   after delete on phb_person for each row
+-- begin
+--   site_wide_search.register_event (:new.person_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- FAQ Procs
 
-create or replace trigger faq_q_and_as_sws_insert_tr
-  after insert on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.faq_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_insert_tr
+--   after insert on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.faq_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger faq_q_and_as_sws_update_tr
-  after update on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.faq_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_update_tr
+--   after update on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.faq_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
 
     
-create or replace trigger faq_q_and_as_sws_delete_tr
-  after delete on faq_q_and_as for each row
-begin
-  site_wide_search.register_event (:new.faq_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger faq_q_and_as_sws_delete_tr
+--   after delete on faq_q_and_as for each row
+-- begin
+--   site_wide_search.register_event (:new.faq_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- Survey Procs
 
-create or replace trigger surveys_sws_insert_tr
-  after insert on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'INSERT');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_insert_tr
+--   after insert on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'INSERT');
+-- end;
+-- /
+-- show errors
 
-create or replace trigger surveys_sws_update_tr
-  after update on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'UPDATE');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_update_tr
+--   after update on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'UPDATE');
+-- end;
+-- /
+-- show errors
 
     
-create or replace trigger surveys_sws_delete_tr
-  after delete on surveys for each row
-begin
-  site_wide_search.register_event (:new.survey_id, 'DELETE');
-end;
-/
-show errors
+-- create or replace trigger surveys_sws_delete_tr
+--   after delete on surveys for each row
+-- begin
+--   site_wide_search.register_event (:new.survey_id, 'DELETE');
+-- end;
+-- /
+-- show errors
 
 --------------------------------------------------------
 -- The user_datastore proc which is called on every change of the datastore.
@@ -482,6 +484,3 @@
 end;
 /
 show errors;
-
-
-exit;
