2006-08-08 16:59:35 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2009-04-20 18:39:24 +00:00
<XMLDB PATH= "mod/chat/db" VERSION= "20090420" COMMENT= "XMLDB file for Moodle mod/chat"
2007-01-21 23:49:23 +00:00
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
2006-08-08 16:59:35 +00:00
<TABLES >
<TABLE NAME= "chat" COMMENT= "Each of these is a chat room" NEXT= "chat_messages" >
<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= "name" />
<FIELD NAME= "name" TYPE= "char" LENGTH= "255" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "course" 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= "keepdays" />
<FIELD NAME= "keepdays" TYPE= "int" LENGTH= "11" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "introformat" NEXT= "studentlogs" />
<FIELD NAME= "studentlogs" TYPE= "int" LENGTH= "4" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "keepdays" NEXT= "chattime" />
<FIELD NAME= "chattime" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "studentlogs" NEXT= "schedule" />
<FIELD NAME= "schedule" TYPE= "int" LENGTH= "4" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "chattime" NEXT= "timemodified" />
<FIELD NAME= "timemodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "schedule" />
2006-08-08 16:59:35 +00:00
</FIELDS>
<KEYS >
2009-04-20 18:39:24 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
2006-08-08 16:59:35 +00:00
</KEYS>
<INDEXES >
<INDEX NAME= "course" UNIQUE= "false" FIELDS= "course" />
</INDEXES>
</TABLE>
2008-07-24 03:15:03 +00:00
<TABLE NAME= "chat_messages" COMMENT= "Stores all the actual chat messages" PREVIOUS= "chat" NEXT= "chat_messages_current" >
2006-08-08 16:59:35 +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= "chatid" />
<FIELD NAME= "chatid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "chatid" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "system" />
<FIELD NAME= "system" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "groupid" NEXT= "message" />
<FIELD NAME= "message" TYPE= "text" LENGTH= "small" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "system" NEXT= "timestamp" />
<FIELD NAME= "timestamp" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "message" />
2006-08-08 16:59:35 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "chatid" />
2006-08-08 16:59:35 +00:00
<KEY NAME= "chatid" TYPE= "foreign" FIELDS= "chatid" REFTABLE= "chat" REFFIELDS= "id" PREVIOUS= "primary" />
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" NEXT= "groupid" />
<INDEX NAME= "groupid" UNIQUE= "false" FIELDS= "groupid" PREVIOUS= "userid" NEXT= "timestamp-chatid" />
<INDEX NAME= "timestamp-chatid" UNIQUE= "false" FIELDS= "timestamp, chatid" PREVIOUS= "groupid" />
</INDEXES>
</TABLE>
2008-07-24 03:15:03 +00:00
<TABLE NAME= "chat_messages_current" COMMENT= "Stores current session" PREVIOUS= "chat_messages" NEXT= "chat_users" >
<FIELDS >
2009-05-01 14:07:43 +00:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" NEXT= "chatid" />
<FIELD NAME= "chatid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "chatid" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "system" />
<FIELD NAME= "system" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "groupid" NEXT= "message" />
<FIELD NAME= "message" TYPE= "text" LENGTH= "small" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "system" NEXT= "timestamp" />
<FIELD NAME= "timestamp" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "message" />
2008-07-24 03:15:03 +00:00
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "chatid" />
<KEY NAME= "chatid" TYPE= "foreign" FIELDS= "chatid" REFTABLE= "chat" REFFIELDS= "id" PREVIOUS= "primary" />
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" NEXT= "groupid" />
<INDEX NAME= "groupid" UNIQUE= "false" FIELDS= "groupid" PREVIOUS= "userid" NEXT= "timestamp-chatid" />
<INDEX NAME= "timestamp-chatid" UNIQUE= "false" FIELDS= "timestamp, chatid" PREVIOUS= "groupid" />
</INDEXES>
</TABLE>
<TABLE NAME= "chat_users" COMMENT= "Keeps track of which users are in which chat rooms" PREVIOUS= "chat_messages_current" >
2006-08-08 16:59:35 +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= "chatid" />
<FIELD NAME= "chatid" TYPE= "int" LENGTH= "11" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "id" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "11" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "chatid" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "11" NOTNULL= "true" UNSIGNED= "false" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "userid" NEXT= "version" />
<FIELD NAME= "version" TYPE= "char" LENGTH= "16" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "groupid" NEXT= "ip" />
<FIELD NAME= "ip" TYPE= "char" LENGTH= "45" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "version" NEXT= "firstping" />
<FIELD NAME= "firstping" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "ip" NEXT= "lastping" />
<FIELD NAME= "lastping" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "firstping" NEXT= "lastmessageping" />
<FIELD NAME= "lastmessageping" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "lastping" NEXT= "sid" />
<FIELD NAME= "sid" TYPE= "char" LENGTH= "32" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "lastmessageping" NEXT= "course" />
<FIELD NAME= "course" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" PREVIOUS= "sid" NEXT= "lang" />
<FIELD NAME= "lang" TYPE= "char" LENGTH= "30" NOTNULL= "true" SEQUENCE= "false" PREVIOUS= "course" />
2006-08-08 16:59:35 +00:00
</FIELDS>
<KEYS >
2007-09-24 22:17:05 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" NEXT= "chatid" />
2006-08-08 16:59:35 +00:00
<KEY NAME= "chatid" TYPE= "foreign" FIELDS= "chatid" REFTABLE= "chat" REFFIELDS= "id" PREVIOUS= "primary" />
</KEYS>
<INDEXES >
<INDEX NAME= "userid" UNIQUE= "false" FIELDS= "userid" NEXT= "lastping" />
<INDEX NAME= "lastping" UNIQUE= "false" FIELDS= "lastping" PREVIOUS= "userid" NEXT= "groupid" />
<INDEX NAME= "groupid" UNIQUE= "false" FIELDS= "groupid" PREVIOUS= "lastping" />
</INDEXES>
</TABLE>
</TABLES>
2009-04-20 18:39:24 +00:00
</XMLDB>