Moving to GitHub.
[platal.git] / upgrade / account / 01_profiles.sql
1 drop table if exists profiles;
2 create table profiles (
3 # Profile identifiers
4 pid int(6) not null auto_increment,
5 hrpid varchar(255) not null,
6
7 # Who is this?
8 xorg_id int(8) not null,
9 ax_id varchar(8) default null,
10
11 # Some singletons
12 # birthdate and birthdate given by reference directory (library, school...)
13 birthdate date default null,
14 birthdate_ref date default null,
15 next_birthday date default null,
16 deathdate date default null,
17 deathdate_rec date default null,
18
19 sex enum('female', 'male') not null default 'male',
20 section tinyint(2) unsigned default null,
21 cv text default null,
22 freetext mediumtext default null,
23 freetext_pub enum('private', 'public') not null default 'private',
24 medals_pub enum('private', 'public') not null default 'private',
25 alias_pub enum('private', 'public') not null default 'private',
26
27 nationality1 char(2) default null,
28 nationality2 char(2) default null,
29 nationality3 char(2) default null,
30
31 # Directory informations
32 email_directory varchar(255) default null,
33
34 # Last modification date (for notifications)
35 last_change date not null,
36
37 primary key pid (pid),
38 unique key hrpid (hrpid),
39 unique key xorg_id (xorg_id),
40 key ax_id (ax_id),
41 key nationality1 (nationality1),
42 key nationality2 (nationality2),
43 key nationality3 (nationality3)
44 ) ENGINE=InnoDB, CHARSET=utf8;
45
46 # vim:set syntax=mysql: