Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql	29 Jun 2001 20:28:38 -0000	1.2
+++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql	9 Mar 2002 02:00:02 -0000	1.3
@@ -94,10 +94,19 @@
     );
 
     acs_object_type.create_type (
+        supertype => 'acs_message',
+        object_type => 'bboard_message',
+        pretty_name => 'BBoard Message',
+        pretty_plural => 'BBoard Messages',
+        table_name => 'BBOARD_MESSAGES',
+        id_column => 'MESSAGE_ID'
+    );
+
+    acs_object_type.create_type (
         supertype => 'acs_object',
         object_type => 'bboard_forum',
         pretty_name => 'BBoard Forum',
-        pretty_plural => 'BBoard Forum',
+        pretty_plural => 'BBoard Forums',
         table_name => 'BBOARD_FORUMS',
         id_column => 'FORUM_ID',
         name_method => 'BBOARD_FORUM.NAME'
@@ -117,7 +126,19 @@
 /
 show errors
 
+-- bboard messages
+--
+-- these are subtypes of acs_message
+-- all of the metadata is in acs_messages
 
+create table bboard_messages (
+	message_id				 constraint bboard_messages_msg_id_fk
+							 references acs_messages(message_id)
+							 on delete cascade
+							 constraint bboard_messages_msg_id_pk
+							 primary key
+);
+
 -- bboard forums
 --
 -- these act as primary containers for messages
@@ -156,7 +177,7 @@
                 on delete cascade,
     message_id integer
         constraint bboard_fmm_message_id_fk
-            references acs_messages (message_id)
+            references bboard_messages (message_id)
                 on delete cascade,
     status varchar(20)
         constraint bboard_fmm_status_ck
@@ -182,6 +203,7 @@
     category_id integer
         constraint bboard_c_category_id_fk
             references acs_objects (object_id)
+			on delete cascade
         constraint bboard_c_category_id_pk
             primary key,
     short_name varchar(400)
@@ -206,7 +228,7 @@
                 on delete cascade,
     message_id integer
         constraint bboard_cmm_message_id_fk
-            references acs_messages (message_id)
+            references bboard_messages (message_id)
                 on delete cascade,
     constraint bboard_category_message_map_pk
         primary key (category_id, message_id)
@@ -254,7 +276,7 @@
 create table bboard_thread_subscribers (
     thread_id integer
         constraint bboard_ts_thread_id_fk
-            references acs_messages (message_id)
+            references bboard_messages (message_id)
                 on delete cascade,
     subscriber_id integer
         constraint bboard_ts_subscriber_id_fk
