1 CREATE TABLE accounts (
2 # Account identifier
and type
3 uid
int(6) not null auto_increment
,
4 hruid
varchar(255) not NULL,
6 # Account
type and state
7 type varchar(16) default null,
8 is_admin bool
default false,
9 state enum('pending', 'active', 'disabled') not null default 'pending',
12 password char(40) default null,
13 token varchar(32) default null,
14 weak_password
varchar(256) default null,
15 registration_date datetime
not null,
17 # Administrative tools
18 flags
set('watch') not null default '',
19 comment varchar(255) default null,
22 full_name
varchar(255) default null,
23 display_name
varchar(255) default null,
24 sex
enum('female', 'male') not null default 'male',
25 email_format
enum('text', 'html') not null default 'html',
26 skin
varchar(32) default null,
27 last_version
varchar(16) not null,
29 primary key uid (uid
),
30 unique key hruid (hruid
),
31 key full_name (full_name
),
36 CREATE TABLE account_types (
37 type varchar(16) not null,
38 perms
set('mail', 'groups', 'forums', 'list', 'search', 'portal') default '',
40 primary key type (type)
43 CREATE TABLE account_profiles (
46 perms
set('owner') not null default '',
48 primary key id (uid
, pid
),
53 # vim
:set syntax
=mysql
: