MDL-37726 stop using PREVIOUS/NEXT in install.xml files
[moodle.git] / mnet / service / enrol / db / install.xml
CommitLineData
481f0e15 1<?xml version="1.0" encoding="UTF-8" ?>
c3dd6b01 2<XMLDB PATH="mnet/service/enrol/db" VERSION="20120122" COMMENT="XMLDB file for MNet service plugin mnet/service/enrol"
481f0e15
DM
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
5>
6 <TABLES>
7 <TABLE NAME="mnetservice_enrol_courses" COMMENT="Caches the information fetched via XML-RPC about courses on remote hosts that are offered for our users" NEXT="mnetservice_enrol_enrolments">
8 <FIELDS>
c3dd6b01
PS
9 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" COMMENT="Unique remote-course ID" NEXT="hostid"/>
10 <FIELD NAME="hostid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The id of the remote MNet host" PREVIOUS="id" NEXT="remoteid"/>
11 <FIELD NAME="remoteid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of course on its home server" PREVIOUS="hostid" NEXT="categoryid"/>
12 <FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The id of the category on the remote server" PREVIOUS="remoteid" NEXT="categoryname"/>
481f0e15 13 <FIELD NAME="categoryname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="categoryid" NEXT="sortorder"/>
c3dd6b01 14 <FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="categoryname" NEXT="fullname"/>
481f0e15
DM
15 <FIELD NAME="fullname" TYPE="char" LENGTH="254" NOTNULL="true" SEQUENCE="false" PREVIOUS="sortorder" NEXT="shortname"/>
16 <FIELD NAME="shortname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="fullname" NEXT="idnumber"/>
17 <FIELD NAME="idnumber" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="shortname" NEXT="summary"/>
bb88a54d 18 <FIELD NAME="summary" TYPE="text" NOTNULL="true" SEQUENCE="false" PREVIOUS="idnumber" NEXT="summaryformat"/>
c3dd6b01
PS
19 <FIELD NAME="summaryformat" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="Format of the summary field" PREVIOUS="summary" NEXT="startdate"/>
20 <FIELD NAME="startdate" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" PREVIOUS="summaryformat" NEXT="roleid"/>
21 <FIELD NAME="roleid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The ID of the role at the remote server that our users will get when we enrol them there" PREVIOUS="startdate" NEXT="rolename"/>
481f0e15
DM
22 <FIELD NAME="rolename" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the role at the remote server that our users will get when we enrol them there" PREVIOUS="roleid"/>
23 </FIELDS>
24 <KEYS>
25 <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the mnet_course table"/>
26 </KEYS>
27 <INDEXES>
28 <INDEX NAME="uq_hostid_remoteid" UNIQUE="true" FIELDS="hostid, remoteid" COMMENT="The id of the course on its host must be unique"/>
29 </INDEXES>
30 </TABLE>
31 <TABLE NAME="mnetservice_enrol_enrolments" COMMENT="Caches the information about enrolments of our local users in courses on remote hosts" PREVIOUS="mnetservice_enrol_courses">
32 <FIELDS>
c3dd6b01
PS
33 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" COMMENT="Unique enrollment ID" NEXT="hostid"/>
34 <FIELD NAME="hostid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the remote MNet host" PREVIOUS="id" NEXT="userid"/>
35 <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of our local user on this server" PREVIOUS="hostid" NEXT="remotecourseid"/>
36 <FIELD NAME="remotecourseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the course at the remote server. Note that this may and may not be cached in our mnetservice_enrol_courses table, depends of whether the course is opened for remote enrolments or our student is the enrolled there via other plugin" PREVIOUS="userid" NEXT="rolename"/>
481f0e15 37 <FIELD NAME="rolename" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="remotecourseid" NEXT="enroltime"/>
c3dd6b01 38 <FIELD NAME="enroltime" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="rolename" NEXT="enroltype"/>
481f0e15
DM
39 <FIELD NAME="enroltype" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the enrol plugin at the remote server that was used to enrol our student into their course" PREVIOUS="enroltime"/>
40 </FIELDS>
41 <KEYS>
54f69781 42 <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key" NEXT="fk_user"/>
481f0e15
DM
43 <KEY NAME="fk_user" TYPE="foreign" FIELDS="userid" REFTABLE="user" REFFIELDS="id" PREVIOUS="primary" NEXT="fk_mnet_host"/>
44 <KEY NAME="fk_mnet_host" TYPE="foreign" FIELDS="hostid" REFTABLE="mnet_host" REFFIELDS="id" PREVIOUS="fk_user"/>
45 </KEYS>
46 </TABLE>
47 </TABLES>
54f69781 48</XMLDB>