Avoid copy of geoloc_pays during database migration.
[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
bd5155cc
FB
31 # Last modification date (for notifications)
32 last_change date not null,
33
81ef0a18
FB
34 primary key pid (pid),
35 unique key hrpid (hrpid),
36 unique key xorg_id (xorg_id),
4e426a09
FB
37 key ax_id (ax_id),
38 key nationality1 (nationality1),
39 key nationality2 (nationality2),
40 key nationality3 (nationality3)
950bf4f6 41) ENGINE=InnoDB, CHARSET=utf8;
81ef0a18
FB
42
43# vim:set syntax=mysql: