1 DROP TABLE IF EXISTS accounts
;
2 CREATE TABLE accounts (
3 # Account identifier
and type
4 uid
int(6) not null auto_increment
,
5 hruid
varchar(255) not NULL,
7 # Account
type and state
8 type varchar(16) default null,
9 is_admin bool
default false,
10 state enum('pending', 'active', 'disabled') not null default 'pending',
13 password char(40) default null,
14 token varchar(32) default null,
15 weak_password
varchar(256) default null,
16 registration_date datetime
not null,
18 # Administrative tools
19 flags
set('watch') not null default '',
20 comment varchar(255) default null,
23 email
varchar(255) default null,
24 full_name
varchar(255) default null,
25 display_name
varchar(255) default null,
26 sex
enum('female', 'male') not null default 'male',
27 email_format
enum('text', 'html') not null default 'html',
28 skin
varchar(32) default null,
29 last_version
varchar(16) not null,
31 primary key uid (uid
),
32 unique key hruid (hruid
),
33 key full_name (full_name
),
36 ) ENGINE
=InnoDB
, CHARSET
=utf8
;
38 DROP TABLE IF EXISTS account_types
;
39 CREATE TABLE account_types (
40 type varchar(16) not null,
41 perms
set('mail', 'groups', 'forums', 'list', 'search', 'portal') default '',
43 primary key type (type)
44 ) ENGINE
=InnoDB
, CHARSET
=utf8
;
46 DROP TABLE IF EXISTS account_profiles
;
47 CREATE TABLE account_profiles (
50 perms
set('owner') not null default '',
52 primary key id (uid
, pid
),
55 ) ENGINE
=InnoDB
, CHARSET
=utf8
;
57 # vim
:set syntax
=mysql
: