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