Index: openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-create.sql	29 Nov 2001 22:19:47 -0000	1.3
+++ openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-create.sql	9 Mar 2002 02:00:02 -0000	1.4
@@ -109,7 +109,7 @@
 select acs_object_type__create_type (
     'bboard_forum',
     'BBoard Forum',
-    'BBoard Forum',
+    'BBoard Forums',
     'acs_object',
     'BBOARD_FORUMS',
     'FORUM_ID',
@@ -132,7 +132,27 @@
     'BBOARD_CATEGORY__NAME'
 );
 
+select acs_object_type__create_type (
+	'bboard_message',
+	'BBoard Message',
+	'BBoard Messages',
+	'acs_message',
+	'BBOARD_MESSAGES',
+	'MESSAGE_ID',
+	null,
+	'f',
+	null,
+	null
+);
 
+create table bboard_messages (
+	message_id				 integer
+							 constraint bboard_messages_msg_id_fk
+							 references acs_messages(message_id)
+							 on delete cascade
+							 constraint bboard_messages_msg_id_pk
+							 primary key
+);
 
 -- bboard forums
 --
@@ -172,7 +192,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
@@ -200,6 +220,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)
@@ -224,7 +245,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)
@@ -272,7 +293,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
