Branch merge of preferences work branch. Includes fixes for several bugs. WARNING...
[lhc/web/wiklou.git] / maintenance / tables.sql
index f740d9b..6621041 100644 (file)
@@ -86,6 +86,7 @@ CREATE TABLE /*_*/user (
   
   -- Newline-separated list of name=value defining the user
   -- preferences
+  -- Now obsolete in favour of user_properties table.
   user_options blob NOT NULL,
   
   -- This is a timestamp which is updated when a user
@@ -126,10 +127,7 @@ CREATE TABLE /*_*/user (
   -- Meant primarily for heuristic checks to give an impression of whether
   -- the account has been used much.
   --
-  user_editcount int,
-  
-   -- Flag for entries hidden from users and Sysops
-  user_hidden bool NOT NULL default 0,
+  user_editcount int
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name);
@@ -614,7 +612,7 @@ CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
 -- Stores an ID for every time any article is visited;
 -- depending on $wgHitcounterUpdateFreq, it is
 -- periodically cleared and the page_counter column
--- in the page table updated for the all articles
+-- in the page table updated for all the articles
 -- that have been visited.)
 --
 CREATE TABLE /*_*/hitcounter (
@@ -1271,5 +1269,13 @@ CREATE TABLE /*_*/valid_tag (
   vt_tag varchar(255) NOT NULL PRIMARY KEY
 ) /*$wgDBTableOptions*/;
 
+CREATE TABLE /*_*/user_properties(
+  up_user int not null,
+  up_property varbinary(32) not null,
+  up_value blob
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/user_properties_user_property on user_properties (up_user,up_property);
+CREATE INDEX /*i*/user_properties_property on user_properties (up_property);
 
 -- vim: sw=2 sts=2 et