summaryrefslogtreecommitdiff
path: root/maintenance/sqlite/archives/patch-ug_group-length-increase-255.sql
blob: 3daeb7c6044ce41d9f1d6ac0c18546c06caaea22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CREATE TABLE /*_*/user_groups_tmp (
  ug_user int unsigned NOT NULL default 0,
  ug_group varbinary(255) NOT NULL default ''
) /*$wgDBTableOptions*/;

INSERT INTO /*_*/user_groups_tmp
	SELECT ug_user, ug_group
		FROM /*_*/user_groups;

DROP TABLE /*_*/user_groups;

ALTER TABLE /*_*/user_groups_tmp RENAME TO /*_*/user_groups;

CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group);
CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group);