no message
[moodle.git] / lib / db / mysql.sql
CommitLineData
93777df6 1# phpMyAdmin MySQL-Dump
2# version 2.3.0-dev
3# http://phpwizard.net/phpMyAdmin/
4# http://www.phpmyadmin.net/ (download page)
5#
6# Host: localhost
b5fe4c93 7# Generation Time: Jun 25, 2002 at 05:04 PM
93777df6 8# Server version: 3.23.49
9# PHP Version: 4.1.2
10# Database : `moodle`
11# --------------------------------------------------------
12
dafa318b 13#
14# Table structure for table `config`
15#
16
17CREATE TABLE `config` (
18 `id` int(10) unsigned NOT NULL auto_increment,
19 `name` varchar(255) NOT NULL default '',
20 `value` varchar(255) NOT NULL default '',
21 PRIMARY KEY (`id`),
22 UNIQUE KEY `name` (`name`)
23) TYPE=MyISAM COMMENT='Moodle configuration variables';
24# --------------------------------------------------------
25
93777df6 26#
27# Table structure for table `course`
28#
29
da5c172a 30CREATE TABLE `course` (
31 `id` int(10) unsigned NOT NULL auto_increment,
32 `category` int(10) unsigned NOT NULL default '0',
33 `password` varchar(50) NOT NULL default '',
34 `fullname` varchar(254) NOT NULL default '',
35 `shortname` varchar(15) NOT NULL default '',
36 `summary` text NOT NULL,
b5fe4c93 37 `format` enum('weeks','social','topics') NOT NULL default 'weeks',
d897cae4 38 `modinfo` text NOT NULL,
b5fe4c93 39 `newsitems` smallint(5) unsigned NOT NULL default '1',
da5c172a 40 `teacher` varchar(100) NOT NULL default 'Teacher',
b4d7002e 41 `teachers` varchar(100) NOT NULL default 'Teachers',
da5c172a 42 `student` varchar(100) NOT NULL default 'Student',
b4d7002e 43 `students` varchar(100) NOT NULL default 'Students',
bd2ad32f 44 `guest` tinyint(2) unsigned NOT NULL default '0',
da5c172a 45 `startdate` int(10) unsigned NOT NULL default '0',
e3f0a6a7 46 `numsections` smallint(5) unsigned NOT NULL default '1',
13beeacb 47 `showrecent` smallint(5) unsigned NOT NULL default '1',
2f21e988 48 `marker` int(10) unsigned NOT NULL default '0',
f13b00d3 49 `timecreated` int(10) unsigned NOT NULL default '0',
da5c172a 50 `timemodified` int(10) unsigned NOT NULL default '0',
51 PRIMARY KEY (`id`)
93777df6 52) TYPE=MyISAM;
53# --------------------------------------------------------
54
55#
56# Table structure for table `course_categories`
57#
58
b5fe4c93 59CREATE TABLE `course_categories` (
60 `id` int(10) unsigned NOT NULL auto_increment,
61 `name` varchar(255) NOT NULL default '',
62 PRIMARY KEY (`id`),
63 UNIQUE KEY `id` (`id`)
93777df6 64) TYPE=MyISAM COMMENT='Course categories';
65# --------------------------------------------------------
66
67#
68# Table structure for table `course_modules`
69#
70
b5fe4c93 71CREATE TABLE `course_modules` (
72 `id` int(10) unsigned NOT NULL auto_increment,
73 `course` int(10) unsigned NOT NULL default '0',
74 `module` int(10) unsigned NOT NULL default '0',
75 `instance` int(10) unsigned NOT NULL default '0',
76 `section` int(10) unsigned NOT NULL default '0',
77 `added` int(10) unsigned NOT NULL default '0',
78 `deleted` tinyint(1) unsigned NOT NULL default '0',
79 `score` tinyint(4) NOT NULL default '0',
80 PRIMARY KEY (`id`),
81 UNIQUE KEY `id` (`id`)
93777df6 82) TYPE=MyISAM;
83# --------------------------------------------------------
84
85#
b5fe4c93 86# Table structure for table `course_sections`
93777df6 87#
88
b5fe4c93 89CREATE TABLE `course_sections` (
90 `id` int(10) unsigned NOT NULL auto_increment,
91 `course` int(10) unsigned NOT NULL default '0',
92 `section` int(10) unsigned NOT NULL default '0',
7b1c0ce3 93 `summary` text NOT NULL,
b5fe4c93 94 `sequence` varchar(255) NOT NULL default '',
95 PRIMARY KEY (`id`)
93777df6 96) TYPE=MyISAM;
97# --------------------------------------------------------
98
99#
100# Table structure for table `log`
101#
102
b5fe4c93 103CREATE TABLE `log` (
104 `id` int(10) unsigned NOT NULL auto_increment,
105 `time` int(10) unsigned NOT NULL default '0',
106 `user` int(10) unsigned NOT NULL default '0',
107 `ip` varchar(15) NOT NULL default '',
108 `course` int(10) unsigned NOT NULL default '0',
109 `module` varchar(10) NOT NULL default '',
110 `action` varchar(15) NOT NULL default '',
111 `url` varchar(100) NOT NULL default '',
112 `info` varchar(255) NOT NULL default '',
113 PRIMARY KEY (`id`)
93777df6 114) TYPE=MyISAM COMMENT='Every action is logged as far as possible.';
115# --------------------------------------------------------
116
117#
118# Table structure for table `log_display`
119#
120
65adacc4 121CREATE TABLE `log_display` (
122 `module` varchar(20) NOT NULL default '',
123 `action` varchar(20) NOT NULL default '',
565f7a95 124 `mtable` varchar(20) NOT NULL default '',
65adacc4 125 `field` varchar(40) NOT NULL default ''
565f7a95 126) TYPE=MyISAM COMMENT='For a particular module/action, specifies a moodle table/field.';
93777df6 127# --------------------------------------------------------
128
129#
130# Table structure for table `modules`
131#
132
b5fe4c93 133CREATE TABLE `modules` (
134 `id` int(10) unsigned NOT NULL auto_increment,
135 `name` varchar(20) NOT NULL default '',
b5fe4c93 136 `version` int(10) NOT NULL default '0',
137 `cron` int(10) unsigned NOT NULL default '0',
138 `lastcron` int(10) unsigned NOT NULL default '0',
139 `search` varchar(255) NOT NULL default '',
140 PRIMARY KEY (`id`),
141 UNIQUE KEY `id` (`id`)
93777df6 142) TYPE=MyISAM;
143# --------------------------------------------------------
144
145#
146# Table structure for table `user`
147#
148
b5fe4c93 149CREATE TABLE `user` (
150 `id` int(10) unsigned NOT NULL auto_increment,
151 `confirmed` tinyint(1) NOT NULL default '0',
01a086c3 152 `deleted` tinyint(1) NOT NULL default '0',
b5fe4c93 153 `username` varchar(100) NOT NULL default '',
154 `password` varchar(32) NOT NULL default '',
155 `idnumber` varchar(12) default NULL,
156 `firstname` varchar(20) NOT NULL default '',
157 `lastname` varchar(20) NOT NULL default '',
158 `email` varchar(100) NOT NULL default '',
159 `icq` varchar(15) default NULL,
160 `phone1` varchar(20) default NULL,
161 `phone2` varchar(20) default NULL,
162 `institution` varchar(40) default NULL,
163 `department` varchar(30) default NULL,
164 `address` varchar(70) default NULL,
165 `city` varchar(20) default NULL,
166 `country` char(2) default NULL,
c07daf5b 167 `lang` char(5) default 'en',
b5fe4c93 168 `timezone` float NOT NULL default '99',
169 `firstaccess` int(10) unsigned NOT NULL default '0',
170 `lastaccess` int(10) unsigned NOT NULL default '0',
171 `lastlogin` int(10) unsigned NOT NULL default '0',
172 `currentlogin` int(10) unsigned NOT NULL default '0',
173 `lastIP` varchar(15) default NULL,
a789fb73 174 `secret` varchar(15) default NULL,
b5fe4c93 175 `picture` tinyint(1) default NULL,
176 `url` varchar(255) default NULL,
177 `description` text,
178 `mailformat` tinyint(1) unsigned NOT NULL default '1',
bd2ad32f 179 `maildisplay` tinyint(2) unsigned NOT NULL default '2',
0095d5cd 180 `htmleditor` tinyint(1) unsigned NOT NULL default '1',
b5fe4c93 181 `timemodified` int(10) unsigned NOT NULL default '0',
182 PRIMARY KEY (`id`),
183 UNIQUE KEY `id` (`id`),
184 UNIQUE KEY `username` (`username`)
93777df6 185) TYPE=MyISAM COMMENT='One record for each person';
186# --------------------------------------------------------
187
188#
189# Table structure for table `user_admins`
190#
191
da5c172a 192CREATE TABLE `user_admins` (
193 `id` int(10) unsigned NOT NULL auto_increment,
194 `user` int(10) unsigned NOT NULL default '0',
195 PRIMARY KEY (`id`),
196 UNIQUE KEY `id` (`id`)
93777df6 197) TYPE=MyISAM COMMENT='One record per administrator user';
198# --------------------------------------------------------
199
200#
201# Table structure for table `user_students`
202#
203
b5fe4c93 204CREATE TABLE `user_students` (
205 `id` int(10) unsigned NOT NULL auto_increment,
206 `user` int(10) unsigned NOT NULL default '0',
207 `course` int(10) unsigned NOT NULL default '0',
208 `start` int(10) unsigned NOT NULL default '0',
209 `end` int(10) unsigned NOT NULL default '0',
210 `time` int(10) unsigned NOT NULL default '0',
211 PRIMARY KEY (`id`),
212 UNIQUE KEY `id` (`id`)
93777df6 213) TYPE=MyISAM;
214# --------------------------------------------------------
215
216#
217# Table structure for table `user_teachers`
218#
219
b5fe4c93 220CREATE TABLE `user_teachers` (
221 `id` int(10) unsigned NOT NULL auto_increment,
222 `user` int(10) unsigned NOT NULL default '0',
223 `course` int(10) unsigned NOT NULL default '0',
b4d7002e 224 `authority` int(10) NOT NULL default '3',
225 `role` varchar(40) NOT NULL default '',
b5fe4c93 226 PRIMARY KEY (`id`),
227 UNIQUE KEY `id` (`id`)
93777df6 228) TYPE=MyISAM COMMENT='One record per teacher per course';
229