install.xml 3.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20060926" COMMENT="XMLDB file for core Mahara tables"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="installed_artefact" COMMENT="Information about each installed artefact plugin" NEXT="config">
      <FIELDS> 
        <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" NEXT="version" />
        <FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="active"/>
        <FIELD NAME="active" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="version"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="name" COMMENT="Primary key for installed artefact plugins" />
      </KEYS>
    </TABLE>
    <TABLE NAME="config" COMMENT="Mahara configuration variables" NEXT="config_artefact" PREVIOUS="installed_artefact">
      <FIELDS>
        <FIELD NAME="field" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" NEXT="value"/>
        <FIELD NAME="value" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="field"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="field" COMMENT="Primary key for config" />
      </KEYS>
    </TABLE>
26
    <TABLE NAME="config_artefact" COMMENT="Mahara artefact plugins configuration variables" NEXT="usr" PREVIOUS="config">
27 28 29 30 31 32 33 34 35 36
      <FIELDS>
        <FIELD NAME="plugin" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" NEXT="field"/>
        <FIELD NAME="field" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="plugin" NEXT="value"/>
        <FIELD NAME="value" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="field"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="plugin,field" COMMENT="Primary key for config_artefact" NEXT="pluginfk" />
        <KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="installed_artefact" REFFIELDS="name" PREVIOUS="primary"/>
      </KEYS>
    </TABLE>
37 38 39 40 41 42 43 44 45 46 47 48 49 50
    <TABLE NAME="usr" COMMENT="Basic user information for all system users" PREVIOUS="config_artefact">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" SEQUENCE="true" ENUM="false" NEXT="username"/>
        <FIELD NAME="username" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="password"/>
        <FIELD NAME="password" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="username" NEXT="salt"/>
        <FIELD NAME="salt" TYPE="char" LENGTH="8" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="password"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for usr"/>
    </KEYS>
    <INDEXES>
      <INDEX NAME="usernameuk" UNIQUE="true" FIELDS="LOWER(username)"/>
    </INDEXES>
    </TABLE>
51
 </TABLES>
52
</XMLDB>