Adds the possibility to forge an url linking to a profile page from networking addresses
[platal.git] / upgrade / fusionax-0.0.1 / 03_telephone.sql
CommitLineData
de15699b
GB
1CREATE TABLE IF NOT EXISTS `telephone` (
2 `uid` smallint unsigned NOT NULL,
3 `link_type` enum('address', 'pro', 'user') NOT NULL DEFAULT 'user' COMMENT 'type of parent element',
4 `link_id` tinyint unsigned NOT NULL COMMENT 'id of his parent element',
5 `tel_id` tinyint unsigned NOT NULL COMMENT 'index of this number for the couple (user, parent element)',
6 `tel_type` enum('fixed', 'mobile', 'fax') NOT NULL DEFAULT 'fixed',
7 `search_tel` varchar(25) NOT NULL COMMENT 'search number in an international format with only digits and the initial +',
8 `display_tel` varchar(30) NOT NULL COMMENT 'display number',
9 `pub` enum('private', 'ax', 'public') NOT NULL DEFAULT 'private',
10 PRIMARY KEY(`uid`, `link_type`, `link_id`, `tel_id`),
11 INDEX (`search_tel`)
12);
13
14CREATE TABLE IF NOT EXISTS `phone_formats` (
15 `phoneprf` varchar(4) NOT NULL,
16 `format` varchar(25) NOT NULL,
17 PRIMARY KEY(`phoneprf`)
18);
19
20INSERT INTO `phone_formats` (`phoneprf`, `format`)
21 VALUES ('1', '(+p) ### ### ####'), ('7', ''), ('20', ''), ('27', ''),
22 ('30', ''), ('31', ''), ('32', ''), ('33', '0# ## ## ## ##'),
23 ('34', ''), ('36', ''), ('39', ''), ('40', ''),
24 ('41', ''), ('43', ''), ('44', ''), ('45', ''),
25 ('46', ''), ('47', ''), ('48', ''), ('49', ''),
26 ('51', ''), ('52', ''), ('53', ''), ('54', ''),
27 ('55', ''), ('56', ''), ('57', ''), ('58', ''),
28 ('60', ''), ('61', ''), ('62', ''), ('63', ''),
29 ('64', ''), ('65', ''), ('66', ''), ('81', ''),
30 ('82', ''), ('84', ''), ('86', ''), ('90', ''),
31 ('91', ''), ('92', ''), ('93', ''), ('94', ''),
32 ('95', ''), ('98', ''), ('212', ''), ('213', ''),
33 ('216', ''), ('218', ''), ('220', ''), ('221', ''),
34 ('222', ''), ('223', ''), ('224', ''), ('225', ''),
35 ('226', ''), ('227', ''), ('228', ''), ('229', ''),
36 ('230', ''), ('231', ''), ('232', ''), ('233', ''),
37 ('234', ''), ('235', ''), ('236', ''), ('237', ''),
38 ('238', ''), ('239', ''), ('240', ''), ('241', ''),
39 ('242', ''), ('243', ''), ('244', ''), ('245', ''),
40 ('246', ''), ('247', ''), ('248', ''), ('249', ''),
41 ('250', ''), ('251', ''), ('252', ''), ('253', ''),
42 ('254', ''), ('255', ''), ('256', ''), ('257', ''),
43 ('258', ''), ('260', ''), ('261', ''), ('262', ''),
44 ('263', ''), ('264', ''), ('265', ''), ('266', ''),
45 ('267', ''), ('268', ''), ('269', ''), ('290', ''),
46 ('291', ''), ('297', ''), ('298', ''), ('299', ''),
47 ('350', ''), ('351', ''), ('352', ''), ('353', ''),
48 ('354', ''), ('355', ''), ('356', ''), ('357', ''),
49 ('358', ''), ('359', ''), ('370', ''), ('371', ''),
50 ('372', ''), ('373', ''), ('374', ''), ('375', ''),
51 ('376', ''), ('377', ''), ('378', ''), ('379', ''),
52 ('380', ''), ('381', ''), ('382', ''), ('385', ''),
53 ('386', ''), ('387', ''), ('389', ''), ('420', ''),
54 ('421', ''), ('423', ''), ('500', ''), ('501', ''),
55 ('502', ''), ('503', ''), ('504', ''), ('505', ''),
56 ('506', ''), ('507', ''), ('508', ''), ('509', ''),
57 ('590', ''), ('591', ''), ('592', ''), ('593', ''),
58 ('594', ''), ('595', ''), ('596', ''), ('597', ''),
59 ('598', ''), ('599', ''), ('670', ''), ('672', ''),
60 ('673', ''), ('674', ''), ('675', ''), ('676', ''),
61 ('677', ''), ('678', ''), ('679', ''), ('680', ''),
62 ('681', ''), ('682', ''), ('683', ''), ('684', ''),
63 ('685', ''), ('686', ''), ('687', ''), ('688', ''),
64 ('689', ''), ('690', ''), ('691', ''), ('692', ''),
65 ('850', ''), ('852', ''), ('853', ''), ('855', ''),
66 ('856', ''), ('880', ''), ('886', ''), ('960', ''),
67 ('961', ''), ('962', ''), ('963', ''), ('964', ''),
68 ('965', ''), ('966', ''), ('967', ''), ('968', ''),
69 ('970', ''), ('971', ''), ('972', ''), ('973', ''),
70 ('974', ''), ('975', ''), ('976', ''), ('977', ''),
71 ('992', ''), ('993', ''), ('994', ''), ('995', ''),
72 ('996', ''), ('998', '');
73