Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / mod / glossary / db / install.xml
blob96d4622a2db13fe0a884e6fce1bd13f7debea8b8
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <XMLDB PATH="mod/glossary/db" VERSION="20061114" COMMENT="XMLDB file for Moodle mod/glossary"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
6   <TABLES>
7     <TABLE NAME="glossary" COMMENT="all glossaries" NEXT="glossary_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="allowduplicatedentries"/>
13         <FIELD NAME="allowduplicatedentries" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="intro" NEXT="displayformat"/>
14         <FIELD NAME="displayformat" TYPE="char" LENGTH="50" NOTNULL="true" DEFAULT="dictionary" SEQUENCE="false" ENUM="false" PREVIOUS="allowduplicatedentries" NEXT="mainglossary"/>
15         <FIELD NAME="mainglossary" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="displayformat" NEXT="showspecial"/>
16         <FIELD NAME="showspecial" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="mainglossary" NEXT="showalphabet"/>
17         <FIELD NAME="showalphabet" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="showspecial" NEXT="showall"/>
18         <FIELD NAME="showall" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="showalphabet" NEXT="allowcomments"/>
19         <FIELD NAME="allowcomments" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="showall" NEXT="allowprintview"/>
20         <FIELD NAME="allowprintview" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="allowcomments" NEXT="usedynalink"/>
21         <FIELD NAME="usedynalink" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="allowprintview" NEXT="defaultapproval"/>
22         <FIELD NAME="defaultapproval" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="usedynalink" NEXT="globalglossary"/>
23         <FIELD NAME="globalglossary" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="defaultapproval" NEXT="entbypage"/>
24         <FIELD NAME="entbypage" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="10" SEQUENCE="false" ENUM="false" PREVIOUS="globalglossary" NEXT="editalways"/>
25         <FIELD NAME="editalways" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="entbypage" NEXT="rsstype"/>
26         <FIELD NAME="rsstype" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="editalways" NEXT="rssarticles"/>
27         <FIELD NAME="rssarticles" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="rsstype" NEXT="assessed"/>
28         <FIELD NAME="assessed" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="rssarticles" NEXT="assesstimestart"/>
29         <FIELD NAME="assesstimestart" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="assessed" NEXT="assesstimefinish"/>
30         <FIELD NAME="assesstimefinish" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="assesstimestart" NEXT="scale"/>
31         <FIELD NAME="scale" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="assesstimefinish" NEXT="timecreated"/>
32         <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="scale" NEXT="timemodified"/>
33         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated"/>
34       </FIELDS>
35       <KEYS>
36         <KEY NAME="primary" TYPE="primary" FIELDS="id" />
37       </KEYS>
38       <INDEXES>
39         <INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
40       </INDEXES>
41     </TABLE>
42     <TABLE NAME="glossary_entries" COMMENT="all glossary entries" PREVIOUS="glossary" NEXT="glossary_alias">
43       <FIELDS>
44         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="glossaryid"/>
45         <FIELD NAME="glossaryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
46         <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="glossaryid" NEXT="concept"/>
47         <FIELD NAME="concept" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="definition"/>
48         <FIELD NAME="definition" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="concept" NEXT="format"/>
49         <FIELD NAME="format" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="definition" NEXT="attachment"/>
50         <FIELD NAME="attachment" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="format" NEXT="timecreated"/>
51         <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="attachment" NEXT="timemodified"/>
52         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="teacherentry"/>
53         <FIELD NAME="teacherentry" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="sourceglossaryid"/>
54         <FIELD NAME="sourceglossaryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="teacherentry" NEXT="usedynalink"/>
55         <FIELD NAME="usedynalink" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="sourceglossaryid" NEXT="casesensitive"/>
56         <FIELD NAME="casesensitive" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="usedynalink" NEXT="fullmatch"/>
57         <FIELD NAME="fullmatch" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="casesensitive" NEXT="approved"/>
58         <FIELD NAME="approved" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="fullmatch"/>
59       </FIELDS>
60       <KEYS>
61         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="glossaryid"/>
62         <KEY NAME="glossaryid" TYPE="foreign" FIELDS="glossaryid" REFTABLE="glossary" REFFIELDS="id" PREVIOUS="primary"/>
63       </KEYS>
64       <INDEXES>
65         <INDEX NAME="userid" UNIQUE="false" FIELDS="userid" NEXT="concept"/>
66         <INDEX NAME="concept" UNIQUE="false" FIELDS="concept" PREVIOUS="userid"/>
67       </INDEXES>
68     </TABLE>
69     <TABLE NAME="glossary_alias" COMMENT="entries alias" PREVIOUS="glossary_entries" NEXT="glossary_categories">
70       <FIELDS>
71         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="entryid"/>
72         <FIELD NAME="entryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="alias"/>
73         <FIELD NAME="alias" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="entryid"/>
74       </FIELDS>
75       <KEYS>
76         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="entryid"/>
77         <KEY NAME="entryid" TYPE="foreign" FIELDS="entryid" REFTABLE="glossary_entries" REFFIELDS="id" PREVIOUS="primary"/>
78       </KEYS>
79     </TABLE>
80     <TABLE NAME="glossary_categories" COMMENT="all categories for glossary entries" PREVIOUS="glossary_alias" NEXT="glossary_entries_categories">
81       <FIELDS>
82         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="glossaryid"/>
83         <FIELD NAME="glossaryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="name"/>
84         <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="glossaryid" NEXT="usedynalink"/>
85         <FIELD NAME="usedynalink" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="name"/>
86       </FIELDS>
87       <KEYS>
88         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="glossaryid"/>
89         <KEY NAME="glossaryid" TYPE="foreign" FIELDS="glossaryid" REFTABLE="glossary" REFFIELDS="id" PREVIOUS="primary"/>
90       </KEYS>
91     </TABLE>
92     <TABLE NAME="glossary_entries_categories" COMMENT="categories of each glossary entry" PREVIOUS="glossary_categories" NEXT="glossary_comments">
93       <FIELDS>
94         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="categoryid"/>
95         <FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="entryid"/>
96         <FIELD NAME="entryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="categoryid"/>
97       </FIELDS>
98       <KEYS>
99         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="categoryid"/>
100         <KEY NAME="categoryid" TYPE="foreign" FIELDS="categoryid" REFTABLE="glossary_categories" REFFIELDS="id" PREVIOUS="primary" NEXT="entryid"/>
101         <KEY NAME="entryid" TYPE="foreign" FIELDS="entryid" REFTABLE="glossary_entries" REFFIELDS="id" PREVIOUS="categoryid"/>
102       </KEYS>
103     </TABLE>
104     <TABLE NAME="glossary_comments" COMMENT="comments on glossary entries" PREVIOUS="glossary_entries_categories" NEXT="glossary_formats">
105       <FIELDS>
106         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="entryid"/>
107         <FIELD NAME="entryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
108         <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="entryid" NEXT="entrycomment"/>
109         <FIELD NAME="entrycomment" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="format"/>
110         <FIELD NAME="format" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="entrycomment" NEXT="timemodified"/>
111         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="format"/>
112       </FIELDS>
113       <KEYS>
114         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="entryid"/>
115         <KEY NAME="entryid" TYPE="foreign" FIELDS="entryid" REFTABLE="glossary_entries" REFFIELDS="id" PREVIOUS="primary"/>
116       </KEYS>
117       <INDEXES>
118         <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
119       </INDEXES>
120     </TABLE>
121     <TABLE NAME="glossary_formats" COMMENT="Setting of the display formats" PREVIOUS="glossary_comments" NEXT="glossary_ratings">
122       <FIELDS>
123         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="name"/>
124         <FIELD NAME="name" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="popupformatname"/>
125         <FIELD NAME="popupformatname" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="visible"/>
126         <FIELD NAME="visible" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="popupformatname" NEXT="showgroup"/>
127         <FIELD NAME="showgroup" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="visible" NEXT="defaultmode"/>
128         <FIELD NAME="defaultmode" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="showgroup" NEXT="defaulthook"/>
129         <FIELD NAME="defaulthook" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="defaultmode" NEXT="sortkey"/>
130         <FIELD NAME="sortkey" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="defaulthook" NEXT="sortorder"/>
131         <FIELD NAME="sortorder" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="sortkey"/>
132       </FIELDS>
133       <KEYS>
134         <KEY NAME="primary" TYPE="primary" FIELDS="id" />
135       </KEYS>
136     </TABLE>
137     <TABLE NAME="glossary_ratings" COMMENT="Contains user ratings for entries" PREVIOUS="glossary_formats">
138       <FIELDS>
139         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="userid"/>
140         <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="entryid"/>
141         <FIELD NAME="entryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="time"/>
142         <FIELD NAME="time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="entryid" NEXT="rating"/>
143         <FIELD NAME="rating" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="time"/>
144       </FIELDS>
145       <KEYS>
146         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="entryid"/>
147         <KEY NAME="entryid" TYPE="foreign" FIELDS="entryid" REFTABLE="glossary_entries" REFFIELDS="id" PREVIOUS="primary"/>
148       </KEYS>
149       <INDEXES>
150         <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
151       </INDEXES>
152     </TABLE>
153   </TABLES>
154   <STATEMENTS>
155     <STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display">
156       <SENTENCES>
157         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'add', 'glossary', 'name')" />
158         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'update', 'glossary', 'name')" />
159         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'view', 'glossary', 'name')" />
160         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'view all', 'glossary', 'name')" />
161         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'add entry', 'glossary', 'name')" />
162         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'update entry', 'glossary', 'name')" />
163         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'add category', 'glossary', 'name')" />
164         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'update category', 'glossary', 'name')" />
165         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'delete category', 'glossary', 'name')" />
166         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'add comment', 'glossary', 'name')" />
167         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'update comment', 'glossary', 'name')" />
168         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'delete comment', 'glossary', 'name')" />
169         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'approve entry', 'glossary', 'name')" />
170         <SENTENCE TEXT="(module, action, mtable, field) VALUES ('glossary', 'view entry', 'glossary_entries', 'concept')" />
171       </SENTENCES>
172     </STATEMENT>
173   </STATEMENTS>
174 </XMLDB>