2004-08-24 20:41:07 +00:00
|
|
|
-- Split user table into two parts:
|
|
|
|
|
-- user
|
|
|
|
|
-- user_rights
|
2016-09-07 20:12:38 +00:00
|
|
|
-- The latter contains only the permissions of the user. This way,
|
2004-08-24 20:41:07 +00:00
|
|
|
-- you can store the accounts for several wikis in one central
|
|
|
|
|
-- database but keep user rights local to the wiki.
|
|
|
|
|
|
2005-01-14 13:33:17 +00:00
|
|
|
CREATE TABLE /*$wgDBprefix*/user_rights (
|
2005-05-02 08:40:17 +00:00
|
|
|
-- Key to user_id
|
2007-06-22 20:09:59 +00:00
|
|
|
ur_user int unsigned NOT NULL,
|
2012-10-20 11:35:38 +00:00
|
|
|
|
2005-05-02 08:40:17 +00:00
|
|
|
-- Comma-separated list of permission keys
|
2006-12-21 21:40:43 +00:00
|
|
|
ur_rights tinyblob NOT NULL,
|
2012-10-20 11:35:38 +00:00
|
|
|
|
2005-05-02 08:40:17 +00:00
|
|
|
UNIQUE KEY ur_user (ur_user)
|
|
|
|
|
|
2007-04-22 14:04:06 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
2004-08-24 20:41:07 +00:00
|
|
|
|
2005-01-14 13:33:17 +00:00
|
|
|
INSERT INTO /*$wgDBprefix*/user_rights SELECT user_id,user_rights FROM /*$wgDBprefix*/user;
|
2004-08-24 20:41:07 +00:00
|
|
|
|
2005-01-14 13:33:17 +00:00
|
|
|
ALTER TABLE /*$wgDBprefix*/user DROP COLUMN user_rights;
|