2006-08-11 16:35:11 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2010-04-22 05:15:23 +00:00
<XMLDB PATH= "mod/forum/db" VERSION= "20100322" COMMENT= "XMLDB file for Moodle mod/forum"
2006-08-28 16:20:52 +00:00
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
2006-08-11 16:35:11 +00:00
<TABLES >
<TABLE NAME= "forum" COMMENT= "Forums contain and structure discussion" NEXT= "forum_discussions" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "course" />
<FIELD NAME= "course" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "type" />
<FIELD NAME= "type" TYPE= "char" LENGTH= "20" NOTNULL= "true" DEFAULT= "general" SEQUENCE= "false" PREVIOUS= "course" NEXT= "name" />
<FIELD NAME= "name" TYPE= "char" LENGTH= "255" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "type" NEXT= "intro" />
<FIELD NAME= "intro" TYPE= "text" LENGTH= "small" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "name" NEXT= "introformat" />
<FIELD NAME= "introformat" TYPE= "int" LENGTH= "4" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "text format of intro field" PREVIOUS= "intro" NEXT= "assessed" />
<FIELD NAME= "assessed" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "introformat" NEXT= "assesstimestart" />
<FIELD NAME= "assesstimestart" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "assessed" NEXT= "assesstimefinish" />
<FIELD NAME= "assesstimefinish" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "assesstimestart" NEXT= "scale" />
<FIELD NAME= "scale" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "assesstimefinish" NEXT= "maxbytes" />
<FIELD NAME= "maxbytes" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "scale" NEXT= "maxattachments" />
<FIELD NAME= "maxattachments" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "1" SEQUENCE= "false" COMMENT= "Number of attachments allowed per post" PREVIOUS= "maxbytes" NEXT= "forcesubscribe" />
<FIELD NAME= "forcesubscribe" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "maxattachments" NEXT= "trackingtype" />
<FIELD NAME= "trackingtype" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "1" SEQUENCE= "false" PREVIOUS= "forcesubscribe" NEXT= "rsstype" />
<FIELD NAME= "rsstype" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "trackingtype" NEXT= "rssarticles" />
<FIELD NAME= "rssarticles" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "rsstype" NEXT= "timemodified" />
<FIELD NAME= "timemodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "rssarticles" NEXT= "warnafter" />
<FIELD NAME= "warnafter" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "timemodified" NEXT= "blockafter" />
<FIELD NAME= "blockafter" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "warnafter" NEXT= "blockperiod" />
<FIELD NAME= "blockperiod" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "blockafter" NEXT= "completiondiscussions" />
<FIELD NAME= "completiondiscussions" TYPE= "int" LENGTH= "9" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "Nonzero if a certain number of posts are required to mark this forum completed for a user." PREVIOUS= "blockperiod" NEXT= "completionreplies" />
<FIELD NAME= "completionreplies" TYPE= "int" LENGTH= "9" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "Nonzero if a certain number of replies are required to mark this forum complete for a user." PREVIOUS= "completiondiscussions" NEXT= "completionposts" />
<FIELD NAME= "completionposts" TYPE= "int" LENGTH= "9" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "Nonzero if a certain number of posts or replies (total) are required to mark this forum complete for a user." PREVIOUS= "completionreplies" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-10-10 02:52:25 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
2006-08-11 16:35:11 +00:00
</KEYS>
<INDEXES >
<INDEX NAME= "course" UNIQUE= "false" FIELDS= "course" />
</INDEXES>
</TABLE>
<TABLE NAME= "forum_discussions" COMMENT= "Forums are composed of discussions" PREVIOUS= "forum" NEXT= "forum_posts" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "course" />
<FIELD NAME= "course" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "forum" />
<FIELD NAME= "forum" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "course" NEXT= "name" />
<FIELD NAME= "name" TYPE= "char" LENGTH= "255" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "forum" NEXT= "firstpost" />
<FIELD NAME= "firstpost" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "name" NEXT= "userid" / >
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "firstpost" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "-1" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "assessed" />
<FIELD NAME= "assessed" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "1" SEQUENCE= "false" PREVIOUS= "groupid" NEXT= "timemodified" />
<FIELD NAME= "timemodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "assessed" NEXT= "usermodified" />
<FIELD NAME= "usermodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "timemodified" NEXT= "timestart" />
<FIELD NAME= "timestart" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "usermodified" NEXT= "timeend" />
<FIELD NAME= "timeend" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "timestart" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "forum" />
2006-08-11 16:35:11 +00:00
<KEY NAME= "forum" TYPE= "foreign" FIELDS= "forum" REFTABLE= "forum" REFFIELDS= "id" PREVIOUS= "primary" />
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" />
</INDEXES>
</TABLE>
<TABLE NAME= "forum_posts" COMMENT= "All posts are stored in this table" PREVIOUS= "forum_discussions" NEXT= "forum_queue" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "discussion" />
<FIELD NAME= "discussion" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "parent" />
<FIELD NAME= "parent" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "discussion" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "parent" NEXT= "created" />
<FIELD NAME= "created" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "modified" />
<FIELD NAME= "modified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "created" NEXT= "mailed" />
<FIELD NAME= "mailed" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "modified" NEXT= "subject" />
<FIELD NAME= "subject" TYPE= "char" LENGTH= "255" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "mailed" NEXT= "message" />
<FIELD NAME= "message" TYPE= "text" LENGTH= "small" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "subject" NEXT= "messageformat" />
<FIELD NAME= "messageformat" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "message" NEXT= "messagetrust" />
<FIELD NAME= "messagetrust" TYPE= "int" LENGTH= "2" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "messageformat" NEXT= "attachment" />
<FIELD NAME= "attachment" TYPE= "char" LENGTH= "100" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "messagetrust" NEXT= "totalscore" />
<FIELD NAME= "totalscore" TYPE= "int" LENGTH= "4" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "attachment" NEXT= "mailnow" />
<FIELD NAME= "mailnow" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "totalscore" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "discussion" />
2006-08-11 16:35:11 +00:00
<KEY NAME= "discussion" TYPE= "foreign" FIELDS= "discussion" REFTABLE= "forum_discussions" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "parent" />
2006-08-11 18:36:47 +00:00
<KEY NAME= "parent" TYPE= "foreign" FIELDS= "parent" REFTABLE= "forum_posts" REFFIELDS= "id" COMMENT= "note that to make this recursive FK working someday, the parent field must be decalred NULL" PREVIOUS= "discussion" />
2006-08-11 16:35:11 +00:00
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" NEXT= "created" />
<INDEX NAME= "created" UNIQUE= "false" FIELDS= "created" PREVIOUS= "userid" NEXT= "mailed" />
<INDEX NAME= "mailed" UNIQUE= "false" FIELDS= "mailed" PREVIOUS= "created" />
</INDEXES>
</TABLE>
2010-04-22 05:15:23 +00:00
<TABLE NAME= "forum_queue" COMMENT= "For keeping track of posts that will be mailed in digest form" PREVIOUS= "forum_posts" NEXT= "forum_subscriptions" >
2006-08-11 16:35:11 +00:00
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "discussionid" />
<FIELD NAME= "discussionid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "postid" />
<FIELD NAME= "postid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "discussionid" NEXT= "timemodified" />
<FIELD NAME= "timemodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "The modified time of the original post" PREVIOUS= "postid" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "discussionid" />
2006-08-11 16:35:11 +00:00
<KEY NAME= "discussionid" TYPE= "foreign" FIELDS= "discussionid" REFTABLE= "forum_discussions" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "postid" />
<KEY NAME= "postid" TYPE= "foreign" FIELDS= "postid" REFTABLE= "forum_posts" REFFIELDS= "id" PREVIOUS= "discussionid" />
</KEYS>
<INDEXES >
<INDEX NAME= "user" UNIQUE= "false" FIELDS= "userid" />
</INDEXES>
</TABLE>
2010-04-22 05:15:23 +00:00
<TABLE NAME= "forum_subscriptions" COMMENT= "Keeps track of who is subscribed to what forum" PREVIOUS= "forum_queue" NEXT= "forum_read" >
2006-08-11 16:35:11 +00:00
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "forum" />
<FIELD NAME= "forum" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "forum" />
2006-08-11 16:35:11 +00:00
<KEY NAME= "forum" TYPE= "foreign" FIELDS= "forum" REFTABLE= "forum" REFFIELDS= "id" PREVIOUS= "primary" />
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" />
</INDEXES>
</TABLE>
<TABLE NAME= "forum_read" COMMENT= "Tracks each users read posts" PREVIOUS= "forum_subscriptions" NEXT= "forum_track_prefs" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "forumid" />
<FIELD NAME= "forumid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "discussionid" />
<FIELD NAME= "discussionid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "forumid" NEXT= "postid" />
<FIELD NAME= "postid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "discussionid" NEXT= "firstread" />
<FIELD NAME= "firstread" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "postid" NEXT= "lastread" />
<FIELD NAME= "lastread" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "firstread" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-10-10 02:52:25 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
2006-08-11 16:35:11 +00:00
</KEYS>
<INDEXES >
<INDEX NAME= "userid-forumid" UNIQUE= "false" FIELDS= "userid, forumid" NEXT= "userid-discussionid" />
<INDEX NAME= "userid-discussionid" UNIQUE= "false" FIELDS= "userid, discussionid" PREVIOUS= "userid-forumid" NEXT= "userid-postid" />
<INDEX NAME= "userid-postid" UNIQUE= "false" FIELDS= "userid, postid" PREVIOUS= "userid-discussionid" />
</INDEXES>
</TABLE>
<TABLE NAME= "forum_track_prefs" COMMENT= "Tracks each users untracked forums" PREVIOUS= "forum_read" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "forumid" />
<FIELD NAME= "forumid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" />
2006-08-11 16:35:11 +00:00
</FIELDS>
<KEYS >
2007-10-10 02:52:25 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
2006-08-11 16:35:11 +00:00
</KEYS>
<INDEXES >
<INDEX NAME= "userid-forumid" UNIQUE= "false" FIELDS= "userid, forumid" />
</INDEXES>
</TABLE>
</TABLES>
2010-04-22 05:15:23 +00:00
</XMLDB>