MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / journal / db / install.xml
blob72396f350f630b5e8f4b02cf059edaecf9b91eca
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <XMLDB PATH="mod/journal/db" VERSION="20060921" COMMENT="XMLDB file for Moodle mod/journal"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
6   <TABLES>
7     <TABLE NAME="journal" COMMENT="data for each journal" NEXT="journal_entries">
8       <FIELDS>
9         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>
10         <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="name"/>
11         <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="intro"/>
12         <FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="introformat"/>
13         <FIELD NAME="introformat" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="intro" NEXT="days"/>
14         <FIELD NAME="days" TYPE="int" LENGTH="5" NOTNULL="true" UNSIGNED="true" DEFAULT="7" SEQUENCE="false" ENUM="false" PREVIOUS="introformat" NEXT="assessed"/>
15         <FIELD NAME="assessed" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="days" NEXT="timemodified"/>
16         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="assessed"/>
17       </FIELDS>
18       <KEYS>
19         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for journal"/>
20       </KEYS>
21       <INDEXES>
22         <INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
23       </INDEXES>
24     </TABLE>
25     <TABLE NAME="journal_entries" COMMENT="All the journal entries of all people" PREVIOUS="journal">
26       <FIELDS>
27         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="journal"/>
28         <FIELD NAME="journal" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
29         <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="journal" NEXT="modified"/>
30         <FIELD NAME="modified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="text"/>
31         <FIELD NAME="text" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="modified" NEXT="format"/>
32         <FIELD NAME="format" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="text" NEXT="rating"/>
33         <FIELD NAME="rating" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="format" NEXT="entrycomment"/>
34         <FIELD NAME="entrycomment" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="rating" NEXT="teacher"/>
35         <FIELD NAME="teacher" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="entrycomment" NEXT="timemarked"/>
36         <FIELD NAME="timemarked" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="teacher" NEXT="mailed"/>
37         <FIELD NAME="mailed" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemarked"/>
38       </FIELDS>
39       <KEYS>
40         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for journal_entries" NEXT="journal"/>
41         <KEY NAME="journal" TYPE="foreign" FIELDS="journal" REFTABLE="journal" REFFIELDS="id" PREVIOUS="primary"/>
42       </KEYS>
43       <INDEXES>
44         <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
45       </INDEXES>
46     </TABLE>
47   </TABLES>
48   <STATEMENTS>
49     <STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display">
50       <SENTENCES>
51         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('journal', 'view', 'journal', 'name')" />
52         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('journal', 'add entry', 'journal', 'name')" />
53         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('journal', 'update entry', 'journal', 'name')" />
54         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('journal', 'view responses', 'journal', 'name')" />
55       </SENTENCES>
56     </STATEMENT>
57   </STATEMENTS>
58 </XMLDB>