Adds search on firstname/lastname/nickname (Closes #1469).
[platal.git] / upgrade / 1.1.1 / 10_names.sql
1 ALTER TABLE profile_name_enum ADD COLUMN general_type ENUM('lastname', 'firstname', 'nickname') NOT NULL DEFAULT 'lastname';
2
3 UPDATE profile_name_enum
4 SET general_type = 'lastname'
5 WHERE type LIKE 'lastname%' OR type LIKE 'name_%';
6 UPDATE profile_name_enum
7 SET general_type = 'firstname'
8 WHERE type LIKE 'firstname%';
9 UPDATE profile_name_enum
10 SET general_type = 'nickname'
11 WHERE type IN ('pseudonym', 'nickname');
12
13 ALTER TABLE search_name ADD COLUMN general_type ENUM('lastname', 'firstname', 'nickname') NOT NULL DEFAULT 'lastname';
14
15 -- vim:set syntax=mysql: