Index: openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql	13 Jan 2005 13:58:16 -0000	1.12
+++ openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql	15 Mar 2005 20:06:45 -0000	1.13
@@ -46,8 +46,15 @@
     tree_sortkey                    varbit,
     max_child_sortkey               varbit,
     last_child_post                 timestamptz,
-    reply_count                     integer default 0,
-    approved_reply_count            integer default 0,
+    reply_count                     integer 
+                                    constraint forums_mess_reply_count_ck
+                                    check (reply_count >= 0) default 0,
+    approved_reply_count            integer
+                                    constraint forums_mess_app_rep_count_ck
+                                    check (approved_reply_count >= 0) default 0,
+    last_poster                     integer
+                                    constraint forums_mess_last_poster_fk
+                                    references users(user_id),
     constraint forums_mess_sk_forum_un
     unique (tree_sortkey, forum_id)
 );
