2003-12-15 02:31:29 +00:00
|
|
|
/* If you add/change anything, update
|
|
|
|
boinc_db.C,h
|
|
|
|
and if needed:
|
2004-09-27 04:26:51 +00:00
|
|
|
py/Boinc/
|
|
|
|
database.py
|
|
|
|
html/
|
2004-12-06 22:41:19 +00:00
|
|
|
inc/
|
|
|
|
host.inc (host)
|
2004-09-27 04:26:51 +00:00
|
|
|
db_ops.inc
|
2007-04-24 23:21:42 +00:00
|
|
|
ops/
|
|
|
|
db_update.php
|
2004-09-27 04:26:51 +00:00
|
|
|
user/
|
2004-12-06 22:41:19 +00:00
|
|
|
create_account_action.php (user)
|
|
|
|
team_create_action.php (team)
|
2003-12-15 02:31:29 +00:00
|
|
|
sched/
|
2004-12-06 22:41:19 +00:00
|
|
|
db_dump.C (host, user, team)
|
|
|
|
db_purge.C (workunit, result)
|
2003-11-28 23:11:22 +00:00
|
|
|
*/
|
2003-11-25 15:51:19 +00:00
|
|
|
/* Fields are documented in boinc_db.h */
|
|
|
|
/* Do not replace this with an automatically generated schema */
|
2003-08-15 17:36:44 +00:00
|
|
|
|
2004-08-16 11:31:59 +00:00
|
|
|
/* type is specified as InnoDB for most tables.
|
2004-08-07 20:23:22 +00:00
|
|
|
Supposedly this gives better performance.
|
|
|
|
The others (post, thread, profile) are myISAM
|
|
|
|
because it supports fulltext index
|
|
|
|
*/
|
|
|
|
|
2004-10-08 00:16:33 +00:00
|
|
|
/* fields ending with id (but not _id) are treated specially
|
|
|
|
by the Python code (db_base.py)
|
|
|
|
*/
|
|
|
|
|
2003-08-15 17:36:44 +00:00
|
|
|
create table platform (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
name varchar(254) not null,
|
|
|
|
user_friendly_name varchar(254) not null,
|
2007-02-02 20:14:18 +00:00
|
|
|
deprecated tinyint not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table app (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
name varchar(254) not null,
|
2007-04-23 16:14:47 +00:00
|
|
|
min_version integer not null default 0,
|
|
|
|
deprecated smallint not null default 0,
|
2003-12-11 19:05:52 +00:00
|
|
|
user_friendly_name varchar(254) not null,
|
2007-04-23 16:14:47 +00:00
|
|
|
homogeneous_redundancy smallint not null default 0,
|
|
|
|
weight double not null default 1,
|
|
|
|
beta smallint not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table app_version (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
appid integer not null,
|
|
|
|
version_num integer not null,
|
|
|
|
platformid integer not null,
|
|
|
|
xml_doc blob,
|
2007-02-02 20:14:18 +00:00
|
|
|
min_core_version integer not null default 0,
|
|
|
|
max_core_version integer not null default 0,
|
|
|
|
deprecated tinyint not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table user (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
email_addr varchar(254) not null,
|
|
|
|
name varchar(254),
|
|
|
|
authenticator varchar(254),
|
|
|
|
country varchar(254),
|
|
|
|
postal_code varchar(254),
|
|
|
|
total_credit double not null,
|
|
|
|
expavg_credit double not null,
|
|
|
|
expavg_time double not null,
|
|
|
|
global_prefs blob,
|
|
|
|
project_prefs blob,
|
|
|
|
teamid integer not null,
|
|
|
|
venue varchar(254) not null,
|
|
|
|
url varchar(254),
|
|
|
|
send_email smallint not null,
|
|
|
|
show_hosts smallint not null,
|
|
|
|
posts smallint not null,
|
2005-08-26 22:26:26 +00:00
|
|
|
seti_id integer not null,
|
2003-11-25 15:51:19 +00:00
|
|
|
seti_nresults integer not null,
|
|
|
|
seti_last_result_time integer not null,
|
|
|
|
seti_total_cpu double not null,
|
2003-11-28 23:11:22 +00:00
|
|
|
signature varchar(254),
|
2003-12-15 02:31:29 +00:00
|
|
|
has_profile smallint not null,
|
2004-04-18 18:40:13 +00:00
|
|
|
cross_project_id varchar(254) not null,
|
2005-08-07 01:33:15 +00:00
|
|
|
passwd_hash varchar(254) not null,
|
|
|
|
email_validated smallint not null,
|
2005-08-25 23:07:58 +00:00
|
|
|
donated smallint not null,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table team (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
userid integer not null,
|
|
|
|
name varchar(254) not null,
|
|
|
|
name_lc varchar(254),
|
|
|
|
url varchar(254),
|
|
|
|
type integer not null,
|
|
|
|
name_html varchar(254),
|
|
|
|
description blob,
|
|
|
|
nusers integer not null, /* temp */
|
|
|
|
country varchar(254),
|
|
|
|
total_credit double not null, /* temp */
|
|
|
|
expavg_credit double not null, /* temp */
|
2004-01-14 20:24:24 +00:00
|
|
|
expavg_time double not null,
|
2003-11-25 15:51:19 +00:00
|
|
|
seti_id integer not null,
|
2006-10-27 16:06:42 +00:00
|
|
|
ping_user integer unsigned not null default 0,
|
|
|
|
ping_time integer unsigned not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table host (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
userid integer not null,
|
|
|
|
rpc_seqno integer not null,
|
|
|
|
rpc_time integer not null,
|
|
|
|
total_credit double not null,
|
|
|
|
expavg_credit double not null,
|
|
|
|
expavg_time double not null,
|
|
|
|
|
|
|
|
timezone integer not null,
|
|
|
|
domain_name varchar(254),
|
|
|
|
serialnum varchar(254),
|
|
|
|
last_ip_addr varchar(254),
|
|
|
|
nsame_ip_addr integer not null,
|
|
|
|
|
2004-05-27 18:13:00 +00:00
|
|
|
on_frac double not null,
|
|
|
|
connected_frac double not null,
|
|
|
|
active_frac double not null,
|
2005-07-04 21:47:53 +00:00
|
|
|
cpu_efficiency double not null,
|
|
|
|
duration_correction_factor double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
p_ncpus integer not null,
|
|
|
|
p_vendor varchar(254),
|
|
|
|
p_model varchar(254),
|
2004-05-27 18:13:00 +00:00
|
|
|
p_fpops double not null,
|
|
|
|
p_iops double not null,
|
|
|
|
p_membw double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
|
|
|
|
os_name varchar(254),
|
|
|
|
os_version varchar(254),
|
|
|
|
|
2004-05-27 18:13:00 +00:00
|
|
|
m_nbytes double not null,
|
|
|
|
m_cache double not null,
|
|
|
|
m_swap double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
|
2004-05-27 18:13:00 +00:00
|
|
|
d_total double not null,
|
|
|
|
d_free double not null,
|
|
|
|
d_boinc_used_total double not null,
|
|
|
|
d_boinc_used_project double not null,
|
|
|
|
d_boinc_max double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
|
2004-05-27 18:13:00 +00:00
|
|
|
n_bwup double not null,
|
|
|
|
n_bwdown double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
|
2004-05-27 18:13:00 +00:00
|
|
|
credit_per_cpu_sec double not null,
|
|
|
|
venue varchar(254) not null,
|
|
|
|
nresults_today integer not null,
|
2004-12-06 22:41:19 +00:00
|
|
|
avg_turnaround double not null,
|
2005-01-20 18:50:49 +00:00
|
|
|
host_cpid varchar(254),
|
2005-01-21 07:54:15 +00:00
|
|
|
external_ip_addr varchar(254),
|
2005-02-26 00:24:37 +00:00
|
|
|
max_results_day integer not null,
|
2007-04-24 23:21:42 +00:00
|
|
|
error_rate double not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Only information needed by the server or other backend components
|
|
|
|
* is broken out into separate fields.
|
|
|
|
* Other info, i.e. that needed by the client (files, etc.)
|
|
|
|
* is stored in the XML doc
|
|
|
|
*/
|
|
|
|
create table workunit (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
appid integer not null,
|
|
|
|
name varchar(254) not null,
|
|
|
|
xml_doc blob,
|
|
|
|
batch integer not null,
|
2003-09-04 00:41:51 +00:00
|
|
|
rsc_fpops_est double not null,
|
|
|
|
rsc_fpops_bound double not null,
|
|
|
|
rsc_memory_bound double not null,
|
|
|
|
rsc_disk_bound double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
need_validate smallint not null,
|
|
|
|
canonical_resultid integer not null,
|
|
|
|
canonical_credit double not null,
|
|
|
|
transition_time integer not null,
|
|
|
|
delay_bound integer not null,
|
|
|
|
error_mask integer not null,
|
|
|
|
file_delete_state integer not null,
|
|
|
|
assimilate_state integer not null,
|
2004-12-06 22:41:19 +00:00
|
|
|
hr_class integer not null,
|
2003-12-12 21:10:39 +00:00
|
|
|
opaque double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
min_quorum integer not null,
|
|
|
|
target_nresults integer not null,
|
|
|
|
max_error_results integer not null,
|
|
|
|
max_total_results integer not null,
|
|
|
|
max_success_results integer not null,
|
2004-07-02 19:17:53 +00:00
|
|
|
result_template_file varchar(63) not null,
|
2004-12-06 22:41:19 +00:00
|
|
|
priority integer not null,
|
|
|
|
mod_time timestamp,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
create table result (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
workunitid integer not null,
|
|
|
|
server_state integer not null,
|
|
|
|
outcome integer not null,
|
|
|
|
client_state integer not null,
|
|
|
|
hostid integer not null,
|
2003-10-16 18:10:56 +00:00
|
|
|
userid integer not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
report_deadline integer not null,
|
|
|
|
sent_time integer not null,
|
|
|
|
received_time integer not null,
|
|
|
|
name varchar(254) not null,
|
|
|
|
cpu_time double not null,
|
|
|
|
xml_doc_in blob,
|
|
|
|
xml_doc_out blob,
|
|
|
|
stderr_out blob,
|
|
|
|
batch integer not null,
|
|
|
|
file_delete_state integer not null,
|
|
|
|
validate_state integer not null,
|
|
|
|
claimed_credit double not null,
|
|
|
|
granted_credit double not null,
|
2003-12-12 21:10:39 +00:00
|
|
|
opaque double not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
random integer not null,
|
2004-01-14 20:24:24 +00:00
|
|
|
app_version_num integer not null,
|
2003-11-11 20:49:07 +00:00
|
|
|
appid integer not null,
|
2003-12-23 19:21:52 +00:00
|
|
|
exit_status integer not null,
|
2004-01-16 00:12:27 +00:00
|
|
|
teamid integer not null,
|
2004-12-06 22:41:19 +00:00
|
|
|
priority integer not null,
|
|
|
|
mod_time timestamp,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
2004-06-22 22:56:50 +00:00
|
|
|
create table msg_from_host (
|
2004-01-04 06:48:40 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
2004-05-12 21:21:09 +00:00
|
|
|
hostid integer not null,
|
2004-07-06 04:10:51 +00:00
|
|
|
variety varchar(254) not null,
|
2004-01-04 06:48:40 +00:00
|
|
|
handled smallint not null,
|
2006-01-24 21:38:03 +00:00
|
|
|
xml mediumtext,
|
2004-01-04 06:48:40 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2004-01-04 06:48:40 +00:00
|
|
|
|
2004-06-22 22:56:50 +00:00
|
|
|
create table msg_to_host (
|
2004-03-18 18:08:35 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
hostid integer not null,
|
2004-07-06 04:10:51 +00:00
|
|
|
variety varchar(254) not null,
|
2004-03-18 18:08:35 +00:00
|
|
|
handled smallint not null,
|
2006-01-24 21:38:03 +00:00
|
|
|
xml mediumtext,
|
2004-03-18 18:08:35 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2004-03-18 18:08:35 +00:00
|
|
|
|
2003-08-15 17:36:44 +00:00
|
|
|
create table workseq (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
create_time integer not null,
|
|
|
|
state integer not null,
|
|
|
|
hostid integer not null,
|
|
|
|
wuid_last_done integer not null,
|
|
|
|
wuid_last_sent integer not null,
|
|
|
|
workseqid_master integer not null,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
2003-11-30 21:05:57 +00:00
|
|
|
-- EVERYTHING FROM HERE ON IS USED ONLY FROM PHP,
|
|
|
|
-- SO NOT IN BOINC_DB.H ETC.
|
|
|
|
|
|
|
|
-- represents a language (so can have message boards in different languages)
|
|
|
|
--
|
2003-08-15 17:36:44 +00:00
|
|
|
create table lang (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
name varchar(254) not null,
|
|
|
|
charset varchar(254) not null,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-08-15 17:36:44 +00:00
|
|
|
|
|
|
|
|
2003-11-30 21:05:57 +00:00
|
|
|
-- user profile (description, pictures)
|
|
|
|
--
|
2003-08-15 17:36:44 +00:00
|
|
|
create table profile (
|
2005-03-17 22:04:58 +00:00
|
|
|
userid integer not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
language varchar(254),
|
|
|
|
response1 text,
|
|
|
|
response2 text,
|
|
|
|
has_picture smallint not null,
|
|
|
|
recommend integer not null,
|
|
|
|
reject integer not null,
|
|
|
|
posts integer not null,
|
2004-02-24 04:05:13 +00:00
|
|
|
uotd_time integer,
|
2004-06-09 21:42:23 +00:00
|
|
|
verification integer not null,
|
2004-03-24 22:53:47 +00:00
|
|
|
-- UOD screening status: -1 denied, 0 unrated, 1 approved
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (userid)
|
|
|
|
);
|
|
|
|
|
2003-11-30 21:05:57 +00:00
|
|
|
-- message board category
|
|
|
|
-- help desk is a group of categories that are handled separately
|
|
|
|
--
|
|
|
|
create table category (
|
|
|
|
id integer not null auto_increment,
|
|
|
|
orderID integer not null,
|
|
|
|
-- order in which to display
|
|
|
|
lang integer not null,
|
|
|
|
name varchar(254) binary,
|
|
|
|
is_helpdesk smallint not null,
|
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-11-30 21:05:57 +00:00
|
|
|
|
|
|
|
-- message board topic
|
|
|
|
--
|
|
|
|
create table forum (
|
|
|
|
id integer not null auto_increment,
|
|
|
|
category integer not null,
|
|
|
|
orderID integer not null,
|
|
|
|
title varchar(254) not null,
|
|
|
|
description varchar(254) not null,
|
|
|
|
timestamp integer not null,
|
2003-12-08 01:19:49 +00:00
|
|
|
-- time of last new or modified thread or post
|
2003-11-30 21:05:57 +00:00
|
|
|
threads integer not null,
|
|
|
|
posts integer not null,
|
2005-04-20 22:46:47 +00:00
|
|
|
rate_min_expavg_credit integer not null,
|
|
|
|
rate_min_total_credit integer not null,
|
|
|
|
post_min_interval integer not null,
|
|
|
|
post_min_expavg_credit integer not null,
|
|
|
|
post_min_total_credit integer not null,
|
2007-01-22 21:49:55 +00:00
|
|
|
is_dev_blog tinyint not null default 0,
|
2003-11-30 21:05:57 +00:00
|
|
|
primary key (id)
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2003-11-30 21:05:57 +00:00
|
|
|
|
2003-12-21 05:55:48 +00:00
|
|
|
-- threads in a topic (or questions)
|
2003-11-30 21:05:57 +00:00
|
|
|
--
|
2003-08-15 17:36:44 +00:00
|
|
|
create table thread (
|
2003-08-15 20:35:44 +00:00
|
|
|
id integer not null auto_increment,
|
|
|
|
forum integer not null,
|
|
|
|
owner integer not null,
|
2006-07-01 20:03:48 +00:00
|
|
|
status integer not null,
|
2003-08-15 20:35:44 +00:00
|
|
|
title varchar(254) not null,
|
|
|
|
timestamp integer not null,
|
2003-12-08 01:19:49 +00:00
|
|
|
-- time of last new or modified post
|
2003-08-15 20:35:44 +00:00
|
|
|
views integer not null,
|
2003-11-30 21:05:57 +00:00
|
|
|
-- number of times this has been viewed
|
2003-08-15 20:35:44 +00:00
|
|
|
replies integer not null,
|
2003-11-30 21:05:57 +00:00
|
|
|
-- number of postings in thread
|
2003-12-21 05:55:48 +00:00
|
|
|
activity double not null,
|
|
|
|
-- for questions: number of askers / time since asked
|
2003-12-31 23:09:21 +00:00
|
|
|
-- (set periodically by update_forum_activity.php)
|
2003-11-30 21:05:57 +00:00
|
|
|
sufferers integer not null,
|
|
|
|
-- in help desk: # people who indicated they had same problem
|
2006-07-01 20:03:48 +00:00
|
|
|
score double not null,
|
|
|
|
votes integer not null,
|
2003-12-08 01:19:49 +00:00
|
|
|
create_time integer not null,
|
|
|
|
-- when this record was created
|
2005-01-13 23:06:15 +00:00
|
|
|
hidden integer not null,
|
|
|
|
-- nonzero if hidden by moderators
|
2006-12-22 20:34:58 +00:00
|
|
|
sticky tinyint not null default 0,
|
|
|
|
locked tinyint not null default 0,
|
2003-08-15 17:36:44 +00:00
|
|
|
primary key (id)
|
|
|
|
);
|
2003-11-30 21:05:57 +00:00
|
|
|
|
2003-12-21 05:55:48 +00:00
|
|
|
-- postings in a thread (or answers)
|
2003-11-30 21:05:57 +00:00
|
|
|
-- Each thread has an initial post
|
|
|
|
--
|
|
|
|
create table post (
|
|
|
|
id integer not null auto_increment,
|
|
|
|
thread integer not null,
|
|
|
|
user integer not null,
|
|
|
|
timestamp integer not null,
|
2003-12-08 01:19:49 +00:00
|
|
|
-- create time
|
2003-11-30 21:05:57 +00:00
|
|
|
content text not null,
|
|
|
|
modified integer not null,
|
|
|
|
-- when last modified
|
|
|
|
parent_post integer not null,
|
2003-12-08 01:19:49 +00:00
|
|
|
-- post that was replied to, if any
|
2003-11-30 21:05:57 +00:00
|
|
|
score double not null,
|
|
|
|
votes integer not null,
|
2004-10-12 18:05:38 +00:00
|
|
|
signature tinyint(1) unsigned not null default 0,
|
2005-01-13 23:06:15 +00:00
|
|
|
hidden integer not null,
|
|
|
|
-- nonzero if hidden by moderators
|
2003-11-30 21:05:57 +00:00
|
|
|
primary key (id)
|
|
|
|
);
|
|
|
|
|
2003-12-02 22:04:26 +00:00
|
|
|
-- subscription to a thread
|
|
|
|
--
|
|
|
|
create table subscriptions (
|
|
|
|
userid integer not null,
|
2006-07-01 20:03:48 +00:00
|
|
|
threadid integer not null,
|
|
|
|
notified_time integer not null default 0
|
2004-08-16 11:31:59 +00:00
|
|
|
) type=InnoDB;
|
2004-09-04 23:37:49 +00:00
|
|
|
|
|
|
|
create table forum_preferences (
|
|
|
|
userid integer not null default 0,
|
|
|
|
signature varchar(254) not null default '',
|
|
|
|
posts integer not null default 0,
|
2006-08-13 04:27:24 +00:00
|
|
|
last_post integer not null,
|
2004-09-04 23:37:49 +00:00
|
|
|
avatar varchar(254) not null default '',
|
|
|
|
hide_avatars tinyint(1) unsigned not null default 0,
|
2006-08-13 04:27:24 +00:00
|
|
|
forum_sorting integer not null,
|
|
|
|
thread_sorting integer not null,
|
2006-07-01 20:03:48 +00:00
|
|
|
no_signature_by_default tinyint(1) unsigned not null default 1,
|
2006-08-13 04:27:24 +00:00
|
|
|
images_as_links tinyint(1) unsigned not null default 0,
|
|
|
|
link_popup tinyint(1) unsigned not null default 0,
|
|
|
|
mark_as_read_timestamp integer not null default 0,
|
|
|
|
special_user char(12) not null default '0',
|
|
|
|
jump_to_unread tinyint(1) unsigned not null default 1,
|
|
|
|
hide_signatures tinyint(1) unsigned not null default 0,
|
2004-11-02 20:27:08 +00:00
|
|
|
rated_posts varchar(254) not null,
|
2006-07-01 20:03:48 +00:00
|
|
|
low_rating_threshold integer not null default -25,
|
|
|
|
high_rating_threshold integer not null default 5,
|
|
|
|
minimum_wrap_postcount INT DEFAULT 100 NOT NULL,
|
|
|
|
display_wrap_postcount INT DEFAULT 75 NOT NULL,
|
2005-01-08 19:45:26 +00:00
|
|
|
ignorelist varchar(254) not null,
|
2006-08-13 04:27:24 +00:00
|
|
|
ignore_sticky_posts tinyint(1) unsigned not null,
|
2006-08-08 20:32:37 +00:00
|
|
|
banished_until integer not null default 0,
|
2007-06-04 19:35:11 +00:00
|
|
|
pm_notification tinyint(1) unsigned not null default 1,
|
2004-09-04 23:37:49 +00:00
|
|
|
primary key (userid)
|
|
|
|
) type=MyISAM;
|
|
|
|
|
|
|
|
create table forum_logging (
|
|
|
|
userid integer not null default 0,
|
|
|
|
threadid integer not null default 0,
|
|
|
|
timestamp integer not null default 0,
|
|
|
|
primary key (userid,threadid)
|
|
|
|
) TYPE=MyISAM;
|
2006-07-01 20:03:48 +00:00
|
|
|
|
|
|
|
create table post_ratings (
|
|
|
|
post integer not null,
|
|
|
|
user integer not null,
|
|
|
|
rating tinyint not null,
|
|
|
|
primary key(post, user)
|
|
|
|
) TYPE=MyISAM;
|
2007-04-11 18:05:26 +00:00
|
|
|
|
|
|
|
create table sent_email (
|
|
|
|
userid integer not null,
|
|
|
|
time_sent integer not null,
|
|
|
|
email_type smallint not null,
|
|
|
|
-- 0 = other
|
|
|
|
-- 1 = newsletter
|
|
|
|
-- 2 = lapsed reminder
|
|
|
|
-- 3 = failed reminder
|
|
|
|
-- 4 = forum post hide
|
|
|
|
-- 5 = forum ban
|
|
|
|
-- 6 = fundraising appeal
|
|
|
|
primary key(userid)
|
|
|
|
) TYPE=MyISAM;
|
2007-04-29 14:22:28 +00:00
|
|
|
|
|
|
|
create table private_messages (
|
|
|
|
id int(10) unsigned not null auto_increment,
|
|
|
|
userid int(10) unsigned not null,
|
|
|
|
senderid int(10) unsigned not null,
|
|
|
|
date int(10) unsigned not null,
|
|
|
|
opened tinyint(1) unsigned not null default '0',
|
|
|
|
subject varchar(255) not null,
|
|
|
|
content text not null,
|
|
|
|
primary key(id),
|
|
|
|
key userid (userid)
|
2007-05-02 18:51:51 +00:00
|
|
|
) TYPE=MyISAM;
|
|
|
|
|
2007-05-02 23:17:52 +00:00
|
|
|
create table credited_job (
|
2007-05-02 18:51:51 +00:00
|
|
|
userid integer not null,
|
|
|
|
workunitid bigint not null
|
|
|
|
) TYPE=MyISAM;
|
2007-05-27 17:33:06 +00:00
|
|
|
|
|
|
|
create table donation_items (
|
|
|
|
id integer unsigned not null auto_increment,
|
|
|
|
item_name varchar(32) not null,
|
|
|
|
title varchar(255) not null,
|
|
|
|
description varchar(255) not null,
|
|
|
|
required double unsigned not null default '0',
|
|
|
|
PRIMARY KEY(id)
|
|
|
|
) TYPE=MyISAM;
|
|
|
|
|
|
|
|
create table donation_paypal (
|
|
|
|
id integer not null auto_increment,
|
|
|
|
order_time integer unsigned not null,
|
|
|
|
userid integer not null,
|
|
|
|
email_addr varchar(255) not null,
|
|
|
|
order_amount double(6,2) not null,
|
|
|
|
processed tinyint(1) not null default '0',
|
|
|
|
payment_time integer unsigned not null,
|
|
|
|
item_name varchar(255) not null,
|
|
|
|
item_number varchar(255) not null,
|
|
|
|
payment_status varchar(255) not null,
|
|
|
|
payment_amount double(6,2) not null,
|
|
|
|
payment_fee double(5,2) default null,
|
|
|
|
payment_currency varchar(255) not null,
|
|
|
|
txn_id varchar(255) not null,
|
|
|
|
receiver_email varchar(255) not null,
|
|
|
|
payer_email varchar(255) not null,
|
|
|
|
payer_name varchar(255) not null,
|
|
|
|
PRIMARY KEY(id)
|
2007-07-27 18:30:10 +00:00
|
|
|
) TYPE=MyISAM;
|
|
|
|
|
|
|
|
-- record changes in team membership
|
|
|
|
create table team_delta (
|
|
|
|
userid integer not null,
|
|
|
|
teamid integer not null,
|
|
|
|
timestamp integer not null,
|
|
|
|
joining tinyint(1) not null,
|
|
|
|
total_credit double not null
|
|
|
|
) TYPE=MyISAM;
|