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