2002-06-20 15:15:22 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `forum`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE forum (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
course int(10) unsigned NOT NULL default '0',
|
2002-07-04 08:30:36 +00:00
|
|
|
type enum('discussion','news','general','social','eachuser','teacher') NOT NULL default 'general',
|
2002-06-20 15:15:22 +00:00
|
|
|
name varchar(255) NOT NULL default '',
|
2002-07-20 17:56:21 +00:00
|
|
|
intro mediumtext NOT NULL,
|
2002-06-20 15:15:22 +00:00
|
|
|
open tinyint(1) unsigned NOT NULL default '0',
|
|
|
|
assessed tinyint(1) unsigned NOT NULL default '0',
|
|
|
|
timemodified int(10) unsigned NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id),
|
|
|
|
UNIQUE KEY id (id)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Forums contain and structure discussion';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_discussions`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE forum_discussions (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
course int(10) unsigned NOT NULL default '0',
|
|
|
|
forum int(10) unsigned NOT NULL default '0',
|
|
|
|
name varchar(255) NOT NULL default '',
|
|
|
|
firstpost int(10) unsigned NOT NULL default '0',
|
|
|
|
assessed tinyint(1) NOT NULL default '1',
|
|
|
|
timemodified int(10) unsigned NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
) COMMENT='Forums are composed of discussions';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_posts`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE forum_posts (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
discuss int(10) unsigned NOT NULL default '0',
|
|
|
|
parent int(10) unsigned NOT NULL default '0',
|
|
|
|
user int(10) unsigned NOT NULL default '0',
|
|
|
|
created int(10) unsigned NOT NULL default '0',
|
|
|
|
modified int(10) unsigned NOT NULL default '0',
|
|
|
|
mailed tinyint(1) unsigned NOT NULL default '0',
|
|
|
|
subject varchar(255) NOT NULL default '',
|
|
|
|
message text NOT NULL,
|
|
|
|
totalscore tinyint(4) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
) COMMENT='All posts are stored in this table';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_ratings`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE forum_ratings (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
user int(10) unsigned NOT NULL default '0',
|
|
|
|
post int(10) unsigned NOT NULL default '0',
|
|
|
|
time int(10) unsigned NOT NULL default '0',
|
|
|
|
rating tinyint(4) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
) COMMENT='Contains user ratings for individual posts';
|
2002-06-20 15:15:22 +00:00
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_subscriptions`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE forum_subscriptions (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
user int(10) unsigned NOT NULL default '0',
|
|
|
|
forum int(10) unsigned NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id),
|
|
|
|
UNIQUE KEY id (id)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Keeps track of who is subscribed to what forum';
|
|
|
|
# --------------------------------------------------------
|
2002-06-20 15:15:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dumping data for table `log_display`
|
|
|
|
#
|
|
|
|
|
2002-07-31 14:19:35 +00:00
|
|
|
INSERT INTO log_display VALUES ('forum', 'add', 'forum', 'name');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'add discussion', 'forum_discuss', 'name');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'add post', 'forum_posts', 'subject');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'update post', 'forum_posts', 'subject');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'view discussion', 'forum_discuss', 'name');
|
2002-06-20 15:41:02 +00:00
|
|
|
INSERT INTO log_display VALUES ('forum', 'view forum', 'forum', 'name');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'subscribe', 'forum', 'name');
|
|
|
|
INSERT INTO log_display VALUES ('forum', 'unsubscribe', 'forum', 'name');
|