1 CREATE TABLE IF NOT EXISTS `profile_networking_enum`
(
2 `network_type` tinyint unsigned
NOT NULL,
3 `
name`
varchar(30) NOT NULL,
4 `icon`
varchar(50) NOT NULL COMMENT 'icon filename',
5 `
filter`
enum('email','web','none') NOT NULL DEFAULT 'none' COMMENT 'filter type for addresses',
6 PRIMARY KEY (`network_type`
)
7 ) CHARSET
=utf8
COMMENT='types of networking addresses';
9 CREATE TABLE IF NOT EXISTS `profile_networking`
(
10 `uid`
smallint unsigned
NOT NULL COMMENT 'user id',
11 `nwid` tinyint unsigned
NOT NULL COMMENT 'number of the address for the user',
12 `network_type` tinyint unsigned
NOT NULL,
13 `address`
varchar(255) NOT NULL,
14 `pub`
enum('private','public') NOT NULL DEFAULT 'private',
15 PRIMARY KEY (`uid`
, `nwid`
)
16 ) CHARSET
=utf8
COMMENT='networking addresses';
19 INSERT INTO `profile_networking_enum`
(`network_type`
, `
name`
, `icon`
, `
filter`
)
20 VALUES (0, 'Page web', 'web.gif', 'web');
22 INSERT INTO `profile_networking`
(`uid`
, `nwid`
, `network_type`
, `address`
, `pub`
)
23 SELECT `user_id`
, 0, 0, `profile_web`
, `profile_web_pub`
24 FROM `auth_user_quick`
25 WHERE `profile_web`
<> "";