2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_config (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name varchar(255) NOT NULL default '',
|
2004-01-29 04:13:55 +00:00
|
|
|
value text NOT NULL default '',
|
2004-07-15 05:57:55 +00:00
|
|
|
CONSTRAINT prefix_config_name_uk UNIQUE (name)
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_course (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
category integer NOT NULL default '0',
|
2003-08-07 16:01:31 +00:00
|
|
|
sortorder integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
password varchar(50) NOT NULL default '',
|
|
|
|
fullname varchar(254) NOT NULL default '',
|
|
|
|
shortname varchar(15) NOT NULL default '',
|
2004-06-24 11:46:53 +00:00
|
|
|
idnumber varchar(100) NOT NULL default '',
|
2002-12-15 02:41:07 +00:00
|
|
|
summary text NOT NULL default '',
|
2003-08-10 14:36:52 +00:00
|
|
|
format varchar(10) NOT NULL default 'topics',
|
2003-08-20 07:32:24 +00:00
|
|
|
showgrades integer NOT NULL default '1',
|
2002-12-15 02:41:07 +00:00
|
|
|
modinfo text NOT NULL default '',
|
|
|
|
newsitems integer NOT NULL default '1',
|
|
|
|
teacher varchar(100) NOT NULL default 'Teacher',
|
|
|
|
teachers varchar(100) NOT NULL default 'Teachers',
|
|
|
|
student varchar(100) NOT NULL default 'Student',
|
|
|
|
students varchar(100) NOT NULL default 'Students',
|
|
|
|
guest integer NOT NULL default '0',
|
|
|
|
startdate integer NOT NULL default '0',
|
2004-07-29 14:47:05 +00:00
|
|
|
enrolperiod integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
numsections integer NOT NULL default '1',
|
|
|
|
marker integer NOT NULL default '0',
|
2003-10-06 18:02:35 +00:00
|
|
|
maxbytes integer NOT NULL default '0',
|
2003-10-31 05:57:30 +00:00
|
|
|
showreports integer NOT NULL default '0',
|
2003-07-21 07:31:01 +00:00
|
|
|
visible integer NOT NULL default '1',
|
2004-04-30 12:10:46 +00:00
|
|
|
hiddensections integer NOT NULL default '0',
|
2003-12-30 17:18:06 +00:00
|
|
|
groupmode integer NOT NULL default '0',
|
|
|
|
groupmodeforce integer NOT NULL default '0',
|
2004-04-27 13:39:33 +00:00
|
|
|
lang varchar(10) NOT NULL default '',
|
2005-02-10 07:46:20 +00:00
|
|
|
theme varchar(50) NOT NULL default '',
|
2004-06-26 09:09:00 +00:00
|
|
|
cost varchar(10) NOT NULL default '',
|
2002-12-15 02:41:07 +00:00
|
|
|
timecreated integer NOT NULL default '0',
|
2005-01-24 22:21:28 +00:00
|
|
|
timemodified integer NOT NULL default '0',
|
2005-01-25 04:33:02 +00:00
|
|
|
metacourse integer NOT NULL default '0'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-24 22:48:58 +00:00
|
|
|
CREATE UNIQUE INDEX prefix_course_category_sortorder_uk ON prefix_course (category,sortorder);
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_course_idnumber_idx ON prefix_course (idnumber);
|
|
|
|
CREATE INDEX prefix_course_shortname_idx ON prefix_course (shortname);
|
2003-08-21 08:14:56 +00:00
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_course_categories (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
2003-08-28 18:00:36 +00:00
|
|
|
name varchar(255) NOT NULL default '',
|
2003-07-30 13:02:45 +00:00
|
|
|
description text NOT NULL default '',
|
|
|
|
parent integer NOT NULL default '0',
|
|
|
|
sortorder integer NOT NULL default '0',
|
2003-08-19 09:26:36 +00:00
|
|
|
coursecount integer NOT NULL default '0',
|
2003-07-30 13:02:45 +00:00
|
|
|
visible integer NOT NULL default '1',
|
2003-08-28 18:00:36 +00:00
|
|
|
timemodified integer NOT NULL default '0'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2003-04-28 13:29:26 +00:00
|
|
|
CREATE TABLE prefix_course_display (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
course integer NOT NULL default '0',
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
display integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
2003-05-03 06:44:03 +00:00
|
|
|
CREATE INDEX prefix_course_display_courseuserid_idx ON prefix_course_display (course,userid);
|
2003-04-28 13:29:26 +00:00
|
|
|
|
2005-02-18 14:12:38 +00:00
|
|
|
CREATE TABLE prefix_course_meta (
|
|
|
|
id SERIAL primary key,
|
|
|
|
parent_course integer NOT NULL,
|
|
|
|
child_course integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_course_meta_parent_idx ON prefix_course_meta (parent_course);
|
|
|
|
CREATE INDEX prefix_course_meta_child_idx ON prefix_course_meta (child_course);
|
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_course_modules (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
course integer NOT NULL default '0',
|
|
|
|
module integer NOT NULL default '0',
|
|
|
|
instance integer NOT NULL default '0',
|
|
|
|
section integer NOT NULL default '0',
|
|
|
|
added integer NOT NULL default '0',
|
|
|
|
deleted integer NOT NULL default '0',
|
2003-04-14 15:11:09 +00:00
|
|
|
score integer NOT NULL default '0',
|
2003-09-14 16:31:33 +00:00
|
|
|
indent integer NOT NULL default '0',
|
2004-01-11 17:44:09 +00:00
|
|
|
visible integer NOT NULL default '1',
|
|
|
|
groupmode integer NOT NULL default '0'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_course_modules_visible_idx ON prefix_course_modules (visible);
|
|
|
|
CREATE INDEX prefix_course_modules_course_idx ON prefix_course_modules (course);
|
|
|
|
CREATE INDEX prefix_course_modules_module_idx ON prefix_course_modules (module);
|
|
|
|
CREATE INDEX prefix_course_modules_instance_idx ON prefix_course_modules (instance);
|
|
|
|
CREATE INDEX prefix_course_modules_deleted_idx ON prefix_course_modules (deleted);
|
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_course_sections (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
course integer NOT NULL default '0',
|
|
|
|
section integer NOT NULL default '0',
|
|
|
|
summary text NOT NULL default '',
|
2003-07-21 14:28:04 +00:00
|
|
|
sequence text NOT NULL default '',
|
2003-05-04 07:59:46 +00:00
|
|
|
visible integer NOT NULL default '1'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_course_sections_coursesection_idx ON prefix_course_sections (course,section);
|
|
|
|
|
2004-12-16 12:39:17 +00:00
|
|
|
CREATE TABLE prefix_dst_preset (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name varchar(48) NOT NULL default '',
|
2005-02-25 01:24:52 +00:00
|
|
|
family varchar(100) NOT NULL default '',
|
|
|
|
year integer NOT NULL default '0',
|
2004-12-16 12:39:17 +00:00
|
|
|
apply_offset integer NOT NULL default '0',
|
|
|
|
activate_index integer NOT NULL default '1',
|
|
|
|
activate_day integer NOT NULL default '1',
|
|
|
|
activate_month integer NOT NULL default '1',
|
|
|
|
activate_time char(5) NOT NULL default '03:00',
|
|
|
|
deactivate_index integer NOT NULL default '1',
|
|
|
|
deactivate_day integer NOT NULL default '1',
|
|
|
|
deactivate_month integer NOT NULL default '2',
|
|
|
|
deactivate_time char(5) NOT NULL default '03:00',
|
2004-12-17 02:20:04 +00:00
|
|
|
last_change integer NOT NULL default '0',
|
|
|
|
next_change integer NOT NULL default '0',
|
2004-12-16 12:39:17 +00:00
|
|
|
current_offset integer NOT NULL default '0'
|
2004-12-17 02:20:04 +00:00
|
|
|
);
|
2004-12-16 12:39:17 +00:00
|
|
|
|
2004-01-17 09:47:45 +00:00
|
|
|
CREATE TABLE prefix_event (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name varchar(255) NOT NULL default '',
|
|
|
|
description text,
|
2004-04-27 16:41:16 +00:00
|
|
|
format integer NOT NULL default '0',
|
2004-01-17 09:47:45 +00:00
|
|
|
courseid integer NOT NULL default '0',
|
|
|
|
groupid integer NOT NULL default '0',
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
modulename varchar(20) NOT NULL default '',
|
|
|
|
instance integer NOT NULL default '0',
|
|
|
|
eventtype varchar(20) NOT NULL default '',
|
|
|
|
timestart integer NOT NULL default '0',
|
|
|
|
timeduration integer NOT NULL default '0',
|
2004-05-05 07:07:56 +00:00
|
|
|
visible integer NOT NULL default '1',
|
2004-01-17 09:47:45 +00:00
|
|
|
timemodified integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_event_courseid_idx ON prefix_event (courseid);
|
|
|
|
CREATE INDEX prefix_event_userid_idx ON prefix_event (userid);
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_event_timestart_idx ON prefix_event (timestart);
|
2005-01-10 21:08:29 +00:00
|
|
|
CREATE INDEX prefix_event_timeduration_idx ON prefix_event (timeduration);
|
2004-01-17 09:47:45 +00:00
|
|
|
|
2003-12-30 18:07:09 +00:00
|
|
|
CREATE TABLE prefix_groups (
|
2003-12-30 17:18:06 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
courseid integer NOT NULL default '0',
|
|
|
|
name varchar(255) NOT NULL default '',
|
|
|
|
description text,
|
2004-12-14 06:41:18 +00:00
|
|
|
password varchar(50) NOT NULL default '',
|
2003-12-30 17:18:06 +00:00
|
|
|
lang varchar(10) NOT NULL default '',
|
2005-02-10 07:46:20 +00:00
|
|
|
theme varchar(50) NOT NULL default '',
|
2003-12-30 17:18:06 +00:00
|
|
|
picture integer NOT NULL default '0',
|
2004-02-15 07:29:55 +00:00
|
|
|
hidepicture integer NOT NULL default '0',
|
2003-12-30 17:18:06 +00:00
|
|
|
timecreated integer NOT NULL default '0',
|
|
|
|
timemodified integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
2003-12-30 18:07:09 +00:00
|
|
|
CREATE INDEX prefix_groups_idx ON prefix_groups (courseid);
|
2003-12-30 17:18:06 +00:00
|
|
|
|
2003-12-30 18:07:09 +00:00
|
|
|
CREATE TABLE prefix_groups_members (
|
2003-12-30 17:18:06 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
groupid integer NOT NULL default '0',
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
timeadded integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
2003-12-30 18:07:09 +00:00
|
|
|
CREATE INDEX prefix_groups_members_idx ON prefix_groups_members (groupid);
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_groups_members_userid_idx ON prefix_groups_members (userid);
|
2003-12-30 17:18:06 +00:00
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_log (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
time integer NOT NULL default '0',
|
2002-12-23 09:39:26 +00:00
|
|
|
userid integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
ip varchar(15) NOT NULL default '',
|
|
|
|
course integer NOT NULL default '0',
|
2003-01-06 13:40:05 +00:00
|
|
|
module varchar(20) NOT NULL default '',
|
2004-01-31 14:47:57 +00:00
|
|
|
cmid integer NOT NULL default '0',
|
2003-01-06 13:40:05 +00:00
|
|
|
action varchar(20) NOT NULL default '',
|
2002-12-15 02:41:07 +00:00
|
|
|
url varchar(100) NOT NULL default '',
|
|
|
|
info varchar(255) NOT NULL default ''
|
|
|
|
);
|
|
|
|
|
2003-05-03 06:44:03 +00:00
|
|
|
CREATE INDEX prefix_log_coursemoduleaction_idx ON prefix_log (course,module,action);
|
2003-07-28 02:51:56 +00:00
|
|
|
CREATE INDEX prefix_log_timecoursemoduleaction_idx ON prefix_log (time,course,module,action);
|
2003-05-03 06:44:03 +00:00
|
|
|
CREATE INDEX prefix_log_courseuserid_idx ON prefix_log (course,userid);
|
2003-04-27 09:54:03 +00:00
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_log_display (
|
2002-12-15 02:41:07 +00:00
|
|
|
module varchar(20) NOT NULL default '',
|
|
|
|
action varchar(20) NOT NULL default '',
|
|
|
|
mtable varchar(20) NOT NULL default '',
|
|
|
|
field varchar(40) NOT NULL default ''
|
|
|
|
);
|
|
|
|
|
2004-12-16 12:39:17 +00:00
|
|
|
CREATE TABLE prefix_message (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
useridfrom integer NOT NULL default '0',
|
|
|
|
useridto integer NOT NULL default '0',
|
|
|
|
message text,
|
2004-12-28 08:56:20 +00:00
|
|
|
format integer NOT NULL default '0',
|
2004-12-28 07:40:26 +00:00
|
|
|
timecreated integer NOT NULL default '0',
|
2004-12-16 12:39:17 +00:00
|
|
|
messagetype varchar(50) NOT NULL default ''
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_message_useridfrom_idx ON prefix_message (useridfrom);
|
|
|
|
CREATE INDEX prefix_message_useridto_idx ON prefix_message (useridto);
|
|
|
|
|
|
|
|
CREATE TABLE prefix_message_read (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
useridfrom integer NOT NULL default '0',
|
|
|
|
useridto integer NOT NULL default '0',
|
|
|
|
message text,
|
2004-12-28 08:56:20 +00:00
|
|
|
format integer NOT NULL default '0',
|
2004-12-28 07:40:26 +00:00
|
|
|
timecreated integer NOT NULL default '0',
|
|
|
|
timeread integer NOT NULL default '0',
|
2004-12-16 12:39:17 +00:00
|
|
|
messagetype varchar(50) NOT NULL default '',
|
|
|
|
mailed integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_message_read_useridfrom_idx ON prefix_message_read (useridfrom);
|
|
|
|
CREATE INDEX prefix_message_read_useridto_idx ON prefix_message_read (useridto);
|
|
|
|
|
2004-12-28 07:40:26 +00:00
|
|
|
CREATE TABLE prefix_message_contacts (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
contactid integer NOT NULL default '0',
|
|
|
|
blocked integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_message_contacts_useridcontactid_idx ON prefix_message_contacts (userid,contactid);
|
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_modules (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name varchar(20) NOT NULL default '',
|
|
|
|
version integer NOT NULL default '0',
|
|
|
|
cron integer NOT NULL default '0',
|
|
|
|
lastcron integer NOT NULL default '0',
|
2003-05-09 13:32:27 +00:00
|
|
|
search varchar(255) NOT NULL default '',
|
|
|
|
visible integer NOT NULL default '1'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_modules_name_idx ON prefix_modules (name);
|
|
|
|
|
2003-08-15 14:17:15 +00:00
|
|
|
CREATE TABLE prefix_scale (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
courseid integer NOT NULL default '0',
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
name varchar(255) NOT NULL default '',
|
|
|
|
scale text,
|
|
|
|
description text,
|
|
|
|
timemodified integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
2004-09-30 06:02:39 +00:00
|
|
|
CREATE TABLE prefix_sessions (
|
|
|
|
sesskey char(32) PRIMARY KEY,
|
|
|
|
expiry integer NOT null,
|
|
|
|
expireref varchar(64),
|
|
|
|
data text NOT null
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_sessions_expiry_idx ON prefix_sessions (expiry);
|
2004-02-12 07:06:07 +00:00
|
|
|
|
|
|
|
CREATE TABLE prefix_cache_filters (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
filter varchar(32) NOT NULL default '',
|
|
|
|
version integer NOT NULL default '0',
|
|
|
|
md5key varchar(32) NOT NULL default '',
|
|
|
|
rawtext text,
|
|
|
|
timemodified integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_cache_filters_filtermd5key_idx ON prefix_cache_filters (filter,md5key);
|
|
|
|
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_scale_courseid_idx ON prefix_scale (courseid);
|
|
|
|
|
2004-02-12 07:06:07 +00:00
|
|
|
|
2004-02-09 13:10:19 +00:00
|
|
|
CREATE TABLE prefix_cache_text (
|
2004-02-09 12:27:34 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
md5key varchar(32) NOT NULL default '',
|
|
|
|
formattedtext text,
|
|
|
|
timemodified integer NOT NULL default '0'
|
|
|
|
);
|
|
|
|
|
2004-02-12 07:06:07 +00:00
|
|
|
CREATE INDEX prefix_cache_text_md5key_idx ON prefix_cache_text (md5key);
|
|
|
|
|
2005-02-15 23:12:57 +00:00
|
|
|
#
|
|
|
|
# Table structure for table `user`
|
|
|
|
#
|
|
|
|
# When updating field length, modify
|
|
|
|
# truncate_userinfo() in moodlelib.php
|
|
|
|
#
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_user (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
2004-08-15 07:27:52 +00:00
|
|
|
auth varchar(20) NOT NULL default 'manual',
|
2002-12-15 02:41:07 +00:00
|
|
|
confirmed integer NOT NULL default '0',
|
2004-11-29 05:30:36 +00:00
|
|
|
policyagreed integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
deleted integer NOT NULL default '0',
|
|
|
|
username varchar(100) NOT NULL default '',
|
|
|
|
password varchar(32) NOT NULL default '',
|
2004-09-20 09:08:57 +00:00
|
|
|
idnumber varchar(64) default NULL,
|
2002-12-15 02:41:07 +00:00
|
|
|
firstname varchar(20) NOT NULL default '',
|
|
|
|
lastname varchar(20) NOT NULL default '',
|
|
|
|
email varchar(100) NOT NULL default '',
|
2004-02-20 09:02:27 +00:00
|
|
|
emailstop integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
icq varchar(15) default NULL,
|
2005-03-05 05:57:10 +00:00
|
|
|
skype varchar(50) default NULL,
|
|
|
|
yahoo varchar(50) default NULL,
|
|
|
|
aim varchar(50) default NULL,
|
|
|
|
msn varchar(50) default NULL,
|
2002-12-15 02:41:07 +00:00
|
|
|
phone1 varchar(20) default NULL,
|
|
|
|
phone2 varchar(20) default NULL,
|
|
|
|
institution varchar(40) default NULL,
|
|
|
|
department varchar(30) default NULL,
|
|
|
|
address varchar(70) default NULL,
|
|
|
|
city varchar(20) default NULL,
|
|
|
|
country char(2) default NULL,
|
2004-04-27 13:39:33 +00:00
|
|
|
lang varchar(10) NOT NULL default '',
|
2005-02-10 07:46:20 +00:00
|
|
|
theme varchar(50) NOT NULL default '',
|
2002-12-15 02:41:07 +00:00
|
|
|
timezone float NOT NULL default '99',
|
2005-02-17 21:00:54 +00:00
|
|
|
dstpreset integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
firstaccess integer NOT NULL default '0',
|
|
|
|
lastaccess integer NOT NULL default '0',
|
|
|
|
lastlogin integer NOT NULL default '0',
|
|
|
|
currentlogin integer NOT NULL default '0',
|
|
|
|
lastIP varchar(15) default NULL,
|
|
|
|
secret varchar(15) default NULL,
|
|
|
|
picture integer default NULL,
|
|
|
|
url varchar(255) default NULL,
|
|
|
|
description text,
|
|
|
|
mailformat integer NOT NULL default '1',
|
2004-06-01 07:20:02 +00:00
|
|
|
maildigest integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
maildisplay integer NOT NULL default '2',
|
2003-05-23 05:32:40 +00:00
|
|
|
htmleditor integer NOT NULL default '1',
|
|
|
|
autosubscribe integer NOT NULL default '1',
|
2004-12-21 18:30:19 +00:00
|
|
|
timemodified integer NOT NULL default '0'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-24 22:48:58 +00:00
|
|
|
CREATE UNIQUE INDEX prefix_user_username_uk ON prefix_user (username);
|
2004-09-20 09:08:57 +00:00
|
|
|
CREATE INDEX prefix_user_idnumber_idx ON prefix_user (idnumber);
|
|
|
|
CREATE INDEX prefix_user_auth_idx ON prefix_user (auth);
|
2004-11-17 07:47:03 +00:00
|
|
|
CREATE INDEX prefix_user_deleted_idx ON prefix_user (deleted);
|
|
|
|
CREATE INDEX prefix_user_confirmed_idx ON prefix_user (confirmed);
|
|
|
|
CREATE INDEX prefix_user_firstname_idx ON prefix_user (firstname);
|
|
|
|
CREATE INDEX prefix_user_lastname_idx ON prefix_user (lastname);
|
|
|
|
CREATE INDEX prefix_user_city_idx ON prefix_user (city);
|
|
|
|
CREATE INDEX prefix_user_country_idx ON prefix_user (country);
|
|
|
|
CREATE INDEX prefix_user_lastaccess_idx ON prefix_user (lastaccess);
|
|
|
|
CREATE INDEX prefix_user_email_idx ON prefix_user (email);
|
2004-09-03 10:49:44 +00:00
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_user_admins (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
2002-12-23 09:39:26 +00:00
|
|
|
userid integer NOT NULL default '0'
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_user_admins_userid_idx ON prefix_user_admins (userid);
|
|
|
|
|
2004-01-28 14:14:19 +00:00
|
|
|
CREATE TABLE prefix_user_preferences (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
userid integer NOT NULL default '0',
|
|
|
|
name varchar(50) NOT NULL default '',
|
|
|
|
value varchar(255) NOT NULL default ''
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX prefix_user_preferences_useridname_idx ON prefix_user_preferences (userid,name);
|
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_user_students (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
2002-12-23 09:39:26 +00:00
|
|
|
userid integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
course integer NOT NULL default '0',
|
2002-12-23 09:39:26 +00:00
|
|
|
timestart integer NOT NULL default '0',
|
|
|
|
timeend integer NOT NULL default '0',
|
2003-10-27 12:38:00 +00:00
|
|
|
time integer NOT NULL default '0',
|
2004-11-22 02:36:14 +00:00
|
|
|
timeaccess integer NOT NULL default '0',
|
|
|
|
enrol varchar (20) NOT NULL default ''
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
|
|
|
|
2004-11-24 02:25:36 +00:00
|
|
|
CREATE UNIQUE INDEX prefix_user_students_courseuserid_uk ON prefix_user_students (course,userid);
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_user_students_userid_idx ON prefix_user_students (userid);
|
2004-11-22 02:36:14 +00:00
|
|
|
CREATE INDEX prefix_user_students_enrol_idx ON prefix_user_students (enrol);
|
2003-07-28 02:51:56 +00:00
|
|
|
|
2002-12-23 11:47:17 +00:00
|
|
|
CREATE TABLE prefix_user_teachers (
|
2002-12-15 02:41:07 +00:00
|
|
|
id SERIAL PRIMARY KEY,
|
2002-12-23 09:39:26 +00:00
|
|
|
userid integer NOT NULL default '0',
|
2002-12-15 02:41:07 +00:00
|
|
|
course integer NOT NULL default '0',
|
|
|
|
authority integer NOT NULL default '3',
|
2003-08-16 05:19:24 +00:00
|
|
|
role varchar(40) NOT NULL default '',
|
|
|
|
editall integer NOT NULL default '1',
|
2004-06-24 08:23:16 +00:00
|
|
|
timestart integer NOT NULL default '0',
|
|
|
|
timeend integer NOT NULL default '0',
|
2003-10-27 12:38:00 +00:00
|
|
|
timemodified integer NOT NULL default '0',
|
2004-11-22 02:36:14 +00:00
|
|
|
timeaccess integer NOT NULL default '0',
|
|
|
|
enrol varchar (20) NOT NULL default ''
|
2002-12-15 02:41:07 +00:00
|
|
|
);
|
2002-12-23 11:47:17 +00:00
|
|
|
|
2004-11-24 02:25:36 +00:00
|
|
|
CREATE UNIQUE INDEX prefix_user_teachers_courseuserid_uk ON prefix_user_teachers (course,userid);
|
2004-11-17 07:09:08 +00:00
|
|
|
CREATE INDEX prefix_user_teachers_userid_idx ON prefix_user_teachers (userid);
|
2004-11-22 02:36:14 +00:00
|
|
|
CREATE INDEX prefix_user_teachers_enrol_idx ON prefix_user_teachers (enrol);
|
2003-07-28 02:51:56 +00:00
|
|
|
|
|
|
|
CREATE TABLE prefix_user_coursecreators (
|
2003-02-24 18:48:55 +00:00
|
|
|
id SERIAL8 PRIMARY KEY,
|
|
|
|
userid int8 NOT NULL default '0'
|
|
|
|
);
|
2002-12-23 11:47:17 +00:00
|
|
|
|
2005-02-18 14:12:38 +00:00
|
|
|
CREATE TABLE adodb_logsql (
|
|
|
|
created timestamp NOT NULL,
|
|
|
|
sql0 varchar(250) NOT NULL,
|
|
|
|
sql1 text NOT NULL,
|
|
|
|
params text NOT NULL,
|
|
|
|
tracer text NOT NULL,
|
|
|
|
timer decimal(16,6) NOT NULL
|
2005-01-24 22:21:28 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2004-11-23 03:53:41 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'firstname||\' \'||lastname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('course', 'user report', 'user', 'firstname||\' \'||lastname');
|
2003-01-01 08:15:55 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('course', 'view', 'course', 'fullname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('course', 'enrol', 'course', 'fullname');
|
2004-12-28 07:40:26 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'write', 'user', 'firstname||\' \'||lastname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'read', 'user', 'firstname||\' \'||lastname');
|
2005-01-01 08:41:13 +00:00
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'add contact', 'user', 'firstname||\' \'||lastname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'remove contact', 'user', 'firstname||\' \'||lastname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'block contact', 'user', 'firstname||\' \'||lastname');
|
|
|
|
INSERT INTO prefix_log_display VALUES ('message', 'unblock contact', 'user', 'firstname||\' \'||lastname');
|