1eefb3d9bcc5b3ce46d702a66e2dfcd12580c389
[lhc/web/wiklou.git] / maintenance / archives / patch-user_rights.sql
1 -- Split user table into two parts:
2 -- user
3 -- user_rights
4 -- The later contains only the permissions of the user. This way,
5 -- you can store the accounts for several wikis in one central
6 -- database but keep user rights local to the wiki.
7
8 CREATE TABLE /*$wgDBprefix*/user_rights (
9 ur_user int(5) unsigned NOT NULL,
10 ur_rights tinyblob NOT NULL default '',
11 UNIQUE KEY ur_user (ur_user)
12 ) PACK_KEYS=1;
13
14 INSERT INTO /*$wgDBprefix*/user_rights SELECT user_id,user_rights FROM /*$wgDBprefix*/user;
15
16 ALTER TABLE /*$wgDBprefix*/user DROP COLUMN user_rights;