<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/wiki/db" VERSION="20060812" COMMENT="XMLDB file for Moodle mod/wiki">
+<XMLDB PATH="mod/wiki/db" VERSION="20060925" COMMENT="XMLDB file for Moodle mod/wiki"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
+>
<TABLES>
<TABLE NAME="wiki" COMMENT="Main wik table" NEXT="wiki_entries">
<FIELDS>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for wiki_pages" NEXT="wiki"/>
- <!-- sam notes: if implemented, this foreign key will break, since the
- field defaults to 0 not null and will therefore fail to find its
- referent. -->
<KEY NAME="wiki" TYPE="foreign" FIELDS="wiki" REFTABLE="wiki" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
</TABLE>
<TABLE NAME="wiki_locks" COMMENT="Stores editing locks on Wiki pages" PREVIOUS="wiki_pages">
<FIELDS>
- <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="wikiid"/>
+ <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="wikiid"/>
<FIELD NAME="wikiid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="pagename"/>
<FIELD NAME="pagename" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="wikiid" NEXT="lockedby"/>
- <!-- If the page is or was locked, this field holds the userid of the locker -->
- <FIELD NAME="lockedby" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="pagename" NEXT='lockedsince'/>
- <!-- Time (seconds since epoch) at which lock began -->
- <FIELD NAME="lockedsince" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="lockedby" NEXT='lockedseen'/>
- <!-- Time (seconds since epoch) at which lock was last reconfirmed (we ignore lock if this is >2 mins ago) -->
- <FIELD NAME="lockedseen" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="lockedsince"/>
+ <FIELD NAME="lockedby" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="If the page is or was locked, this field holds the userid of the locker" PREVIOUS="pagename" NEXT="lockedsince"/>
+ <FIELD NAME="lockedsince" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Time (seconds since epoch) at which lock began" PREVIOUS="lockedby" NEXT="lockedseen"/>
+ <FIELD NAME="lockedseen" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Time (seconds since epoch) at which lock was last reconfirmed (we ignore lock if this is &gt;2 mins ago)" PREVIOUS="lockedsince"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for wiki_locks" NEXT="wikiid"/>
<KEY NAME="wikiid" TYPE="foreign" FIELDS="wikiid" REFTABLE="wiki" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
- <!-- Main index used for retrieving locks -->
- <INDEX NAME="wikiid-pagename" UNIQUE="false" FIELDS="wikiid,pagename" NEXT="lockedseen"/>
- <!-- Secondary index used only during cron for deleting expired locks -->
- <INDEX NAME="lockedseen" UNIQUE="false" FIELDS="lockedseen" PREVIOUS="wikiid-pagename"/>
+ <INDEX NAME="wikiid-pagename" UNIQUE="true" FIELDS="wikiid, pagename" COMMENT="Main index used for retrieving locks" NEXT="lockedseen"/>
+ <INDEX NAME="lockedseen" UNIQUE="false" FIELDS="lockedseen" COMMENT="Secondary index used only during cron for deleting expired locks" PREVIOUS="wikiid-pagename"/>
</INDEXES>
</TABLE>
</TABLES>