Merge remote branch 'origin/platal-1.0.0'
[platal.git] / upgrade / newdirectory-0.0.1 / 04_telephone.sql
CommitLineData
d0293d9b
FB
1DROP TABLE IF EXISTS profile_phones;
2
3CREATE TABLE `profile_phones` (
ce0b2c6f 4 `pid` smallint unsigned NOT NULL,
de15699b
GB
5 `link_type` enum('address', 'pro', 'user') NOT NULL DEFAULT 'user' COMMENT 'type of parent element',
6 `link_id` tinyint unsigned NOT NULL COMMENT 'id of his parent element',
7 `tel_id` tinyint unsigned NOT NULL COMMENT 'index of this number for the couple (user, parent element)',
8 `tel_type` enum('fixed', 'mobile', 'fax') NOT NULL DEFAULT 'fixed',
9 `search_tel` varchar(25) NOT NULL COMMENT 'search number in an international format with only digits and the initial +',
10 `display_tel` varchar(30) NOT NULL COMMENT 'display number',
11 `pub` enum('private', 'ax', 'public') NOT NULL DEFAULT 'private',
bde2be3b 12 `comment` varchar(80) NOT NULL,
ce0b2c6f 13 PRIMARY KEY(`pid`, `link_type`, `link_id`, `tel_id`),
aaeb5ec6 14 INDEX (`search_tel`),
ce0b2c6f 15 INDEX pid (pid)
950bf4f6 16) ENGINE=InnoDB, CHARSET=utf8;
de15699b 17
de15699b 18
aaeb5ec6 19# vim:set syntax=mysql: