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',
|
2002-06-20 15:15:22 +00:00
|
|
|
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`
|
|
|
|
#
|
|
|
|
|
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-01-23 12:09:25 +00:00
|
|
|
groupid int(10) unsigned NOT NULL default '0',
|
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',
|
2002-07-31 14:19:35 +00:00
|
|
|
PRIMARY KEY (id)
|
|
|
|
) 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',
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
) COMMENT='All posts are stored in this table';
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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',
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
) 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),
|
|
|
|
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-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');
|