2002-06-20 15:15:22 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `forum`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
CREATE TABLE prefix_forum (
|
2002-06-20 15:15:22 +00:00
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
course int(10) unsigned NOT NULL default '0',
|
2002-08-01 15:48:27 +00:00
|
|
|
type enum('single','news','general','social','eachuser','teacher') NOT NULL default 'general',
|
2002-06-20 15:15:22 +00:00
|
|
|
name varchar(255) NOT NULL default '',
|
2002-08-01 15:48:27 +00:00
|
|
|
intro text NOT NULL,
|
2002-10-03 11:17:51 +00:00
|
|
|
open tinyint(2) unsigned NOT NULL default '2',
|
2003-08-15 13:59:24 +00:00
|
|
|
assessed int(10) unsigned NOT NULL default '0',
|
2004-01-01 04:48:55 +00:00
|
|
|
assesspublic int(4) unsigned NOT NULL default '0',
|
2003-08-25 07:39:06 +00:00
|
|
|
assesstimestart int(10) unsigned NOT NULL default '0',
|
|
|
|
assesstimefinish int(10) unsigned NOT NULL default '0',
|
2003-08-25 12:47:36 +00:00
|
|
|
scale int(10) NOT NULL default '0',
|
2003-10-06 18:02:35 +00:00
|
|
|
maxbytes int(10) unsigned NOT NULL default '0',
|
2002-08-01 15:48:27 +00:00
|
|
|
forcesubscribe tinyint(1) unsigned NOT NULL default '0',
|
2004-05-02 23:08:19 +00:00
|
|
|
rsstype tinyint(2) unsigned NOT NULL default '0',
|
|
|
|
rssarticles tinyint(2) unsigned NOT NULL default '0',
|
2002-06-20 15:15:22 +00:00
|
|
|
timemodified int(10) unsigned NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id),
|
2004-11-18 04:10:47 +00:00
|
|
|
UNIQUE KEY id (id),
|
|
|
|
KEY course (course)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Forums contain and structure discussion';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_discussions`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
CREATE TABLE prefix_forum_discussions (
|
2002-07-31 14:19:35 +00:00
|
|
|
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',
|
2004-01-14 11:50:29 +00:00
|
|
|
userid int(10) unsigned NOT NULL default '0',
|
2004-07-07 17:42:53 +00:00
|
|
|
groupid int(10) NOT NULL default '-1',
|
2002-07-31 14:19:35 +00:00
|
|
|
assessed tinyint(1) NOT NULL default '1',
|
|
|
|
timemodified int(10) unsigned NOT NULL default '0',
|
2004-02-06 13:15:15 +00:00
|
|
|
usermodified int(10) unsigned NOT NULL default '0',
|
2004-11-18 04:10:47 +00:00
|
|
|
PRIMARY KEY (id),
|
|
|
|
KEY prefix_forum_discussions_forum_idx (forum),
|
|
|
|
KEY prefix_forum_discussions_userid_idx (userid)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Forums are composed of discussions';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_posts`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
CREATE TABLE prefix_forum_posts (
|
2002-07-31 14:19:35 +00:00
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
2002-08-01 15:48:27 +00:00
|
|
|
discussion int(10) unsigned NOT NULL default '0',
|
2002-07-31 14:19:35 +00:00
|
|
|
parent int(10) unsigned NOT NULL default '0',
|
2002-12-23 09:39:26 +00:00
|
|
|
userid int(10) unsigned NOT NULL default '0',
|
2002-07-31 14:19:35 +00:00
|
|
|
created int(10) unsigned NOT NULL default '0',
|
|
|
|
modified int(10) unsigned NOT NULL default '0',
|
2004-01-30 21:40:31 +00:00
|
|
|
mailed tinyint(2) unsigned NOT NULL default '0',
|
2002-07-31 14:19:35 +00:00
|
|
|
subject varchar(255) NOT NULL default '',
|
|
|
|
message text NOT NULL,
|
2002-10-10 07:27:57 +00:00
|
|
|
format tinyint(2) NOT NULL default '0',
|
2002-09-10 02:13:44 +00:00
|
|
|
attachment VARCHAR(100) NOT NULL default '',
|
2002-07-31 14:19:35 +00:00
|
|
|
totalscore tinyint(4) NOT NULL default '0',
|
2004-11-18 04:10:47 +00:00
|
|
|
PRIMARY KEY (id),
|
|
|
|
KEY prefix_forum_posts_parent_idx (parent),
|
|
|
|
KEY prefix_forum_posts_discussion_idx (discussion),
|
2005-03-29 04:32:48 +00:00
|
|
|
KEY prefix_forum_posts_userid_idx (userid),
|
|
|
|
KEY prefix_forum_posts_created_idx (created),
|
|
|
|
KEY prefix_forum_posts_mailed_idx (mailed)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='All posts are stored in this table';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
2004-06-01 07:39:27 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `forum_queue`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE prefix_forum_queue (
|
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
userid int(10) unsigned default 0 NOT NULL,
|
|
|
|
discussionid int(10) unsigned default 0 NOT NULL,
|
|
|
|
postid int(10) unsigned default 0 NOT NULL,
|
|
|
|
PRIMARY KEY (id),
|
|
|
|
KEY user (userid),
|
2004-06-01 13:02:13 +00:00
|
|
|
KEY post (postid)
|
2004-06-01 07:39:27 +00:00
|
|
|
) COMMENT='For keeping track of posts that will be mailed in digest form';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
2002-07-31 14:19:35 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `forum_ratings`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
CREATE TABLE prefix_forum_ratings (
|
2002-07-31 14:19:35 +00:00
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
2002-12-23 09:39:26 +00:00
|
|
|
userid int(10) unsigned NOT NULL default '0',
|
2002-07-31 14:19:35 +00:00
|
|
|
post int(10) unsigned NOT NULL default '0',
|
|
|
|
time int(10) unsigned NOT NULL default '0',
|
|
|
|
rating tinyint(4) NOT NULL default '0',
|
2004-11-18 04:10:47 +00:00
|
|
|
PRIMARY KEY (id),
|
|
|
|
KEY userid (userid),
|
|
|
|
KEY post (post)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Contains user ratings for individual posts';
|
2002-06-20 15:15:22 +00:00
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# Table structure for table `forum_subscriptions`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
CREATE TABLE prefix_forum_subscriptions (
|
2002-06-20 15:15:22 +00:00
|
|
|
id int(10) unsigned NOT NULL auto_increment,
|
2002-12-23 09:39:26 +00:00
|
|
|
userid int(10) unsigned NOT NULL default '0',
|
2002-06-20 15:15:22 +00:00
|
|
|
forum int(10) unsigned NOT NULL default '0',
|
|
|
|
PRIMARY KEY (id),
|
2004-11-18 04:10:47 +00:00
|
|
|
UNIQUE KEY id (id),
|
|
|
|
KEY userid (userid),
|
|
|
|
KEY forum (forum)
|
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
|
|
|
|
2005-01-29 09:49:42 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `forum_read`
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE prefix_forum_read (
|
|
|
|
`id` int(10) unsigned NOT NULL auto_increment,
|
|
|
|
`userid` int(10) NOT NULL default '0',
|
|
|
|
`forumid` int(10) NOT NULL default '0',
|
|
|
|
`discussionid` int(10) NOT NULL default '0',
|
|
|
|
`postid` int(10) NOT NULL default '0',
|
|
|
|
`firstread` int(10) NOT NULL default '0',
|
|
|
|
`lastread` int(10) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `prefix_forum_user_forum_idx` (`userid`,`forumid`),
|
|
|
|
KEY `prefix_forum_user_discussion_idx` (`userid`,`discussionid`),
|
|
|
|
KEY `prefix_forum_user_post_idx` (`userid`,`postid`)
|
|
|
|
) COMMENT='Tracks each users read posts';
|
|
|
|
|
2002-06-20 15:15:22 +00:00
|
|
|
#
|
|
|
|
# Dumping data for table `log_display`
|
|
|
|
#
|
|
|
|
|
2002-12-20 14:44:14 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'add', 'forum', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'update', 'forum', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'add discussion', 'forum_discussions', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'add post', 'forum_posts', 'subject');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'update post', 'forum_posts', 'subject');
|
2003-04-24 08:45:27 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'move discussion', 'forum_discussions', 'name');
|
2002-12-20 14:44:14 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'view subscribers', 'forum', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'view discussion', 'forum_discussions', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'view forum', 'forum', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'subscribe', 'forum', 'name');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('forum', 'unsubscribe', 'forum', 'name');
|