new strings
[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
13#
14# Table structure for table `course`
15#
16
da5c172a 17CREATE TABLE `course` (
18 `id` int(10) unsigned NOT NULL auto_increment,
19 `category` int(10) unsigned NOT NULL default '0',
20 `password` varchar(50) NOT NULL default '',
21 `fullname` varchar(254) NOT NULL default '',
22 `shortname` varchar(15) NOT NULL default '',
23 `summary` text NOT NULL,
b5fe4c93 24 `format` enum('weeks','social','topics') NOT NULL default 'weeks',
25 `newsitems` smallint(5) unsigned NOT NULL default '1',
da5c172a 26 `teacher` varchar(100) NOT NULL default 'Teacher',
27 `student` varchar(100) NOT NULL default 'Student',
28 `guest` tinyint(1) unsigned NOT NULL default '0',
29 `startdate` int(10) unsigned NOT NULL default '0',
e3f0a6a7 30 `numsections` smallint(5) unsigned NOT NULL default '1',
2f21e988 31 `marker` int(10) unsigned NOT NULL default '0',
f13b00d3 32 `timecreated` int(10) unsigned NOT NULL default '0',
da5c172a 33 `timemodified` int(10) unsigned NOT NULL default '0',
34 PRIMARY KEY (`id`)
93777df6 35) TYPE=MyISAM;
36# --------------------------------------------------------
37
38#
39# Table structure for table `course_categories`
40#
41
b5fe4c93 42CREATE TABLE `course_categories` (
43 `id` int(10) unsigned NOT NULL auto_increment,
44 `name` varchar(255) NOT NULL default '',
45 PRIMARY KEY (`id`),
46 UNIQUE KEY `id` (`id`)
93777df6 47) TYPE=MyISAM COMMENT='Course categories';
48# --------------------------------------------------------
49
50#
51# Table structure for table `course_modules`
52#
53
b5fe4c93 54CREATE TABLE `course_modules` (
55 `id` int(10) unsigned NOT NULL auto_increment,
56 `course` int(10) unsigned NOT NULL default '0',
57 `module` int(10) unsigned NOT NULL default '0',
58 `instance` int(10) unsigned NOT NULL default '0',
59 `section` int(10) unsigned NOT NULL default '0',
60 `added` int(10) unsigned NOT NULL default '0',
61 `deleted` tinyint(1) unsigned NOT NULL default '0',
62 `score` tinyint(4) NOT NULL default '0',
63 PRIMARY KEY (`id`),
64 UNIQUE KEY `id` (`id`)
93777df6 65) TYPE=MyISAM;
66# --------------------------------------------------------
67
68#
b5fe4c93 69# Table structure for table `course_sections`
93777df6 70#
71
b5fe4c93 72CREATE TABLE `course_sections` (
73 `id` int(10) unsigned NOT NULL auto_increment,
74 `course` int(10) unsigned NOT NULL default '0',
75 `section` int(10) unsigned NOT NULL default '0',
76 `summary` varchar(255) NOT NULL default '',
77 `sequence` varchar(255) NOT NULL default '',
78 PRIMARY KEY (`id`)
93777df6 79) TYPE=MyISAM;
80# --------------------------------------------------------
81
82#
83# Table structure for table `log`
84#
85
b5fe4c93 86CREATE TABLE `log` (
87 `id` int(10) unsigned NOT NULL auto_increment,
88 `time` int(10) unsigned NOT NULL default '0',
89 `user` int(10) unsigned NOT NULL default '0',
90 `ip` varchar(15) NOT NULL default '',
91 `course` int(10) unsigned NOT NULL default '0',
92 `module` varchar(10) NOT NULL default '',
93 `action` varchar(15) NOT NULL default '',
94 `url` varchar(100) NOT NULL default '',
95 `info` varchar(255) NOT NULL default '',
96 PRIMARY KEY (`id`)
93777df6 97) TYPE=MyISAM COMMENT='Every action is logged as far as possible.';
98# --------------------------------------------------------
99
100#
101# Table structure for table `log_display`
102#
103
65adacc4 104CREATE TABLE `log_display` (
105 `module` varchar(20) NOT NULL default '',
106 `action` varchar(20) NOT NULL default '',
107 `table` varchar(20) NOT NULL default '',
108 `field` varchar(40) NOT NULL default ''
93777df6 109) TYPE=MyISAM COMMENT='For a particular module/action, specifies a table field.';
110# --------------------------------------------------------
111
112#
113# Table structure for table `modules`
114#
115
b5fe4c93 116CREATE TABLE `modules` (
117 `id` int(10) unsigned NOT NULL auto_increment,
118 `name` varchar(20) NOT NULL default '',
119 `fullname` varchar(255) NOT NULL default '',
120 `version` int(10) NOT NULL default '0',
121 `cron` int(10) unsigned NOT NULL default '0',
122 `lastcron` int(10) unsigned NOT NULL default '0',
123 `search` varchar(255) NOT NULL default '',
124 PRIMARY KEY (`id`),
125 UNIQUE KEY `id` (`id`)
93777df6 126) TYPE=MyISAM;
127# --------------------------------------------------------
128
129#
130# Table structure for table `user`
131#
132
b5fe4c93 133CREATE TABLE `user` (
134 `id` int(10) unsigned NOT NULL auto_increment,
135 `confirmed` tinyint(1) NOT NULL default '0',
136 `username` varchar(100) NOT NULL default '',
137 `password` varchar(32) NOT NULL default '',
138 `idnumber` varchar(12) default NULL,
139 `firstname` varchar(20) NOT NULL default '',
140 `lastname` varchar(20) NOT NULL default '',
141 `email` varchar(100) NOT NULL default '',
142 `icq` varchar(15) default NULL,
143 `phone1` varchar(20) default NULL,
144 `phone2` varchar(20) default NULL,
145 `institution` varchar(40) default NULL,
146 `department` varchar(30) default NULL,
147 `address` varchar(70) default NULL,
148 `city` varchar(20) default NULL,
149 `country` char(2) default NULL,
150 `timezone` float NOT NULL default '99',
151 `firstaccess` int(10) unsigned NOT NULL default '0',
152 `lastaccess` int(10) unsigned NOT NULL default '0',
153 `lastlogin` int(10) unsigned NOT NULL default '0',
154 `currentlogin` int(10) unsigned NOT NULL default '0',
155 `lastIP` varchar(15) default NULL,
156 `personality` varchar(5) default NULL,
157 `picture` tinyint(1) default NULL,
158 `url` varchar(255) default NULL,
159 `description` text,
160 `mailformat` tinyint(1) unsigned NOT NULL default '1',
161 `timemodified` int(10) unsigned NOT NULL default '0',
162 PRIMARY KEY (`id`),
163 UNIQUE KEY `id` (`id`),
164 UNIQUE KEY `username` (`username`)
93777df6 165) TYPE=MyISAM COMMENT='One record for each person';
166# --------------------------------------------------------
167
168#
169# Table structure for table `user_admins`
170#
171
da5c172a 172CREATE TABLE `user_admins` (
173 `id` int(10) unsigned NOT NULL auto_increment,
174 `user` int(10) unsigned NOT NULL default '0',
175 PRIMARY KEY (`id`),
176 UNIQUE KEY `id` (`id`)
93777df6 177) TYPE=MyISAM COMMENT='One record per administrator user';
178# --------------------------------------------------------
179
180#
181# Table structure for table `user_students`
182#
183
b5fe4c93 184CREATE TABLE `user_students` (
185 `id` int(10) unsigned NOT NULL auto_increment,
186 `user` int(10) unsigned NOT NULL default '0',
187 `course` int(10) unsigned NOT NULL default '0',
188 `start` int(10) unsigned NOT NULL default '0',
189 `end` int(10) unsigned NOT NULL default '0',
190 `time` int(10) unsigned NOT NULL default '0',
191 PRIMARY KEY (`id`),
192 UNIQUE KEY `id` (`id`)
93777df6 193) TYPE=MyISAM;
194# --------------------------------------------------------
195
196#
197# Table structure for table `user_teachers`
198#
199
b5fe4c93 200CREATE TABLE `user_teachers` (
201 `id` int(10) unsigned NOT NULL auto_increment,
202 `user` int(10) unsigned NOT NULL default '0',
203 `course` int(10) unsigned NOT NULL default '0',
204 `authority` varchar(10) default NULL,
205 PRIMARY KEY (`id`),
206 UNIQUE KEY `id` (`id`)
93777df6 207) TYPE=MyISAM COMMENT='One record per teacher per course';
208