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