Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git] / maintenance / sqlite / archives / patch-user_properties-fix-pk.sql
1 CREATE TABLE /*_*/user_properties_tmp (
2 -- Foreign key to user.user_id
3 up_user int NOT NULL,
4
5 -- Name of the option being saved. This is indexed for bulk lookup.
6 up_property varbinary(255) NOT NULL,
7
8 -- Property value as a string.
9 up_value blob,
10 PRIMARY KEY (up_user,up_property)
11 ) /*$wgDBTableOptions*/;
12
13 INSERT INTO /*_*/user_properties_tmp
14 SELECT * FROM /*_*/user_properties;
15
16 DROP TABLE /*_*/user_properties;
17
18 ALTER TABLE /*_*/user_properties_tmp RENAME TO /*_*/user_properties;
19
20 CREATE INDEX /*i*/user_properties_property ON /*_*/user_properties (up_property);