Commit | Line | Data |
---|---|---|
0eeb71ec FB |
1 | CREATE TABLE accounts ( |
2 | # Account identifier and type | |
3 | uid int(6) not null auto_increment, | |
4 | hruid varchar(255) not NULL, | |
5 | ||
6 | # Account type and state | |
7 | type varchar(16) default null, | |
8 | is_admim bool default false, | |
9 | state enum('pending', 'active', 'disabled') not null default 'pending', | |
10 | ||
11 | # Access | |
12 | password char(40) default null, | |
13 | registration_date datetime not null, | |
14 | ||
15 | # Administrative tools | |
16 | flags set('watch') not null default '', | |
17 | comment varchar(255) default null, | |
18 | ||
19 | # User settings | |
20 | name varchar(255) default null, | |
21 | sex enum('female', 'male') not null default 'male', | |
22 | mail_format enum('plain', 'html') not null default 'html', | |
23 | skin varchar(32) default null, | |
24 | ||
25 | primary key uid (uid), | |
26 | unique key hruid (hruid), | |
27 | key name (name), | |
28 | key state (state), | |
29 | key type (type) | |
30 | ); | |
31 | ||
32 | CREATE TABLE account_types ( | |
33 | type varchar(16) not null, | |
34 | perms set('mail', 'groups', 'forums', 'list', 'search', 'portal') default '', | |
35 | ||
36 | primary key type (type) | |
37 | ); | |
38 | ||
39 | CREATE TABLE account_profiles ( | |
40 | uid int(6) not null, | |
41 | pid int(6) not null, | |
147310cf | 42 | perms set('owner') not null default '', |
0eeb71ec FB |
43 | |
44 | primary key id (uid, pid), | |
45 | key uid (uid), | |
46 | key pid (pid) | |
47 | ); | |
48 | ||
49 | # vim:set syntax=mysql: |