-
Notifications
You must be signed in to change notification settings - Fork 9
/
help_schema.sql
40 lines (37 loc) · 1.29 KB
/
help_schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
create table volunteer (
id integer not null auto_increment,
create_time integer not null,
name char(64) not null,
password char(32) not null,
email_addr char(100) not null,
country char(64) not null,
skypeid char(64) not null,
lang1 char(32) not null,
lang2 char(32) not null,
specialties varchar(255) not null,
projects varchar(255) not null,
availability char(128) not null,
voice_ok tinyint not null,
text_ok tinyint not null,
timezone integer not null,
nratings integer not null,
rating_sum integer not null,
last_online integer not null,
last_check integer not null,
status integer not null,
hide tinyint not null,
primary key(id)
);
create table rating (
volunteerid integer not null,
rating integer not null,
timestamp integer not null,
auth char(32) not null,
comment text not null
);
alter table volunteer
add unique(email_addr),
add unique(name);
alter table rating
add index rvt(volunteerid, timestamp),
add index vauth(volunteerid, auth);