Moving to GitHub.
[platal.git] / upgrade / account / 01_profiles.sql
CommitLineData
d0293d9b 1drop table if exists profiles;
81ef0a18
FB
2create 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,
7e735012 15 next_birthday date default null,
cde4fb1d 16 deathdate date default null,
4e7bf1e0 17 deathdate_rec date default null,
4e426a09 18
94b72319 19 sex enum('female', 'male') not null default 'male',
4e426a09
FB
20 section tinyint(2) unsigned default null,
21 cv text default null,
3cb24c05
FB
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',
81ef0a18 26
4e426a09
FB
27 nationality1 char(2) default null,
28 nationality2 char(2) default null,
29 nationality3 char(2) default null,
30
ce0b2c6f
FB
31 # Directory informations
32 email_directory varchar(255) default null,
33
bd5155cc
FB
34 # Last modification date (for notifications)
35 last_change date not null,
36
81ef0a18
FB
37 primary key pid (pid),
38 unique key hrpid (hrpid),
39 unique key xorg_id (xorg_id),
4e426a09
FB
40 key ax_id (ax_id),
41 key nationality1 (nationality1),
42 key nationality2 (nationality2),
43 key nationality3 (nationality3)
950bf4f6 44) ENGINE=InnoDB, CHARSET=utf8;
81ef0a18
FB
45
46# vim:set syntax=mysql: