Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / backup / db / install.xml
blobcb2a3659c007cce4f4e234f402adfce28226627f
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <XMLDB PATH="backup/db" VERSION="20060807" COMMENT="XMLDB file for Moodle backup tables">
3   <TABLES>
4     <TABLE NAME="backup_files" COMMENT="To store and recode ids to user and course files" NEXT="backup_ids">
5       <FIELDS>
6         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="backup_code"/>
7         <FIELD NAME="backup_code" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="file_type"/>
8         <FIELD NAME="file_type" TYPE="char" LENGTH="10" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="backup_code" NEXT="path"/>
9         <FIELD NAME="path" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="file_type" NEXT="old_id"/>
10         <FIELD NAME="old_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="path" NEXT="new_id"/>
11         <FIELD NAME="new_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="old_id"/>
12       </FIELDS>
13       <KEYS>
14         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for backup_files" NEXT="backup_code-file_type-path"/>
15         <KEY NAME="backup_code-file_type-path" TYPE="unique" FIELDS="backup_code, file_type, path" PREVIOUS="primary"/>
16       </KEYS>
17     </TABLE>
18     <TABLE NAME="backup_ids" COMMENT="To store and convert ids in backup/restore" PREVIOUS="backup_files" NEXT="backup_config">
19       <FIELDS>
20         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="backup_code"/>
21         <FIELD NAME="backup_code" TYPE="int" LENGTH="12" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="table_name"/>
22         <FIELD NAME="table_name" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="backup_code" NEXT="old_id"/>
23         <FIELD NAME="old_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="table_name" NEXT="new_id"/>
24         <FIELD NAME="new_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="old_id" NEXT="info"/>
25         <FIELD NAME="info" TYPE="text" LENGTH="medium" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="new_id"/>
26       </FIELDS>
27       <KEYS>
28         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for backup_ids" NEXT="backup_code-table_name-old_id"/>
29         <KEY NAME="backup_code-table_name-old_id" TYPE="unique" FIELDS="backup_code, table_name, old_id" PREVIOUS="primary"/>
30       </KEYS>
31     </TABLE>
32     <TABLE NAME="backup_config" COMMENT="To store backup configuration variables" PREVIOUS="backup_ids" NEXT="backup_courses">
33       <FIELDS>
34         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="name"/>
35         <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="value"/>
36         <FIELD NAME="value" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name"/>
37       </FIELDS>
38       <KEYS>
39         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for backup_config"/>
40       </KEYS>
41       <INDEXES>
42         <INDEX NAME="name" UNIQUE="true" FIELDS="name"/>
43       </INDEXES>
44     </TABLE>
45     <TABLE NAME="backup_courses" COMMENT="To store every course backup status" PREVIOUS="backup_config" NEXT="backup_log">
46       <FIELDS>
47         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="courseid"/>
48         <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="laststarttime"/>
49         <FIELD NAME="laststarttime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="courseid" NEXT="lastendtime"/>
50         <FIELD NAME="lastendtime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="laststarttime" NEXT="laststatus"/>
51         <FIELD NAME="laststatus" TYPE="char" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="lastendtime" NEXT="nextstarttime"/>
52         <FIELD NAME="nextstarttime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="laststatus"/>
53       </FIELDS>
54       <KEYS>
55         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for backup_courses" NEXT="courseid"/>
56         <KEY NAME="courseid" TYPE="unique" FIELDS="courseid" PREVIOUS="primary"/>
57       </KEYS>
58     </TABLE>
59     <TABLE NAME="backup_log" COMMENT="To store every course backup log info" PREVIOUS="backup_courses">
60       <FIELDS>
61         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="courseid"/>
62         <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="time"/>
63         <FIELD NAME="time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="courseid" NEXT="laststarttime"/>
64         <FIELD NAME="laststarttime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="time" NEXT="info"/>
65         <FIELD NAME="info" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="laststarttime"/>
66       </FIELDS>
67       <KEYS>
68         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for backup_log" NEXT="courseid"/>
69         <KEY NAME="courseid" TYPE="foreign" FIELDS="courseid" REFTABLE="backup_courses" REFFIELDS="courseid" COMMENT="Default comment for the key, please edit me" PREVIOUS="primary"/>
70       </KEYS>
71     </TABLE>
72   </TABLES>
73 </XMLDB>