Merge "rdbms: make selectRowCount() use $var argument to exclude NULLs"
[lhc/web/wiklou.git] / maintenance / archives / patch-user_former_groups.sql
index fdaaf8f..b043196 100644 (file)
@@ -1,10 +1,9 @@
--- Stores the groups the user has once belonged to. 
+-- Stores the groups the user has once belonged to.
 -- The user may still belong these groups. Check user_groups.
 CREATE TABLE /*_*/user_former_groups (
   -- Key to user_id
   ufg_user int unsigned NOT NULL default 0,
-  ufg_group varbinary(16) NOT NULL default '',
-  
-  PRIMARY KEY (ufg_user,ufg_group),
-  KEY (ufg_group)
+  ufg_group varbinary(255) NOT NULL default ''
 ) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group);