From c4bc7cff20a2d81890bf5cffc7c7f8f69cff9c16 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 9 May 2003 13:34:10 +0000 Subject: [PATCH] *** empty log message *** --- sql/tables.sql | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/sql/tables.sql b/sql/tables.sql index 8fafd8a..e8e436c 100644 --- a/sql/tables.sql +++ b/sql/tables.sql @@ -1,5 +1,24 @@ -- table definitions +CREATE TABLE discussion_threads ( +id INTEGER NOT NULL UNIQUE AUTO_INCREMENT, +document_id INTEGER NOT NULL, +forst_comment_id INTEGER NOT NULL, +last_comment_id INTEGER NOT NULL, +views INTEGER NOT NULL, +replies INTEGER NOT NULL, +creator_id INTEGER NOT NULL +)TYPE = InnoDB; + +CREATE TABLE discussion_comments ( +id INTEGER NOT NULL UNIQUE AUTO_INCREMENT, +thread_id INTEGER NOT NULL, +user_comment_id INTEGER NOT NULL, +subject_comment_id INTEGER NOT NULL, +body TEXT, +date date +)TYPE = InnoDB; + CREATE TABLE document_text ( id INTEGER NOT NULL UNIQUE AUTO_INCREMENT, document_id integer, @@ -317,8 +336,6 @@ id INTEGER NOT NULL UNIQUE AUTO_INCREMENT, name CHAR(50) NOT NULL )TYPE = InnoDB; - - CREATE TABLE web_sites ( id INTEGER NOT NULL UNIQUE AUTO_INCREMENT, web_site_name CHAR(100) NOT NULL, @@ -332,6 +349,16 @@ word CHAR(255) NOT NULL )TYPE = InnoDB; -- pk constraints +ALTER TABLE discussion_threads +ADD CONSTRAINT PK_discussion_threads +PRIMARY KEY (id) +; + +ALTER TABLE discussion_comments +ADD CONSTRAINT PK_discussion_comments +PRIMARY KEY (id) +; + ALTER TABLE active_sessions ADD CONSTRAINT PK_active_sessions PRIMARY KEY (id) -- libgit2 0.21.4