Merge "convertExtensionToRegistration: Still convert $wgTrackingCategories"
[lhc/web/wiklou.git] / maintenance / archives / patch-user_rights.sql
index b99e229..4947cb1 100644 (file)
@@ -5,12 +5,17 @@
 -- you can store the accounts for several wikis in one central
 -- database but keep user rights local to the wiki.
 
-CREATE TABLE user_rights (
-       ur_user int(5) unsigned NOT NULL,
-       ur_rights tinyblob NOT NULL default '',
-       UNIQUE KEY ur_user (ur_user)
-) PACK_KEYS=1;
+CREATE TABLE /*$wgDBprefix*/user_rights (
+  -- Key to user_id
+  ur_user int unsigned NOT NULL,
 
-INSERT INTO user_rights SELECT user_id,user_rights FROM user;
+  -- Comma-separated list of permission keys
+  ur_rights tinyblob NOT NULL,
 
-ALTER TABLE user DROP COLUMN user_rights;
+  UNIQUE KEY ur_user (ur_user)
+
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*$wgDBprefix*/user_rights SELECT user_id,user_rights FROM /*$wgDBprefix*/user;
+
+ALTER TABLE /*$wgDBprefix*/user DROP COLUMN user_rights;