summaryrefslogtreecommitdiffstats
path: root/upgrades/dbpatches/1.3/mysql/patch/rights.sql
blob: 45d46cb52231727749c2cad88f35ad0b36c06fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
CREATE TABLE rights_tmp (
	rightid		bigint unsigned		DEFAULT '0'	NOT NULL,
	groupid		bigint unsigned		DEFAULT '0'	NOT NULL,
	type		integer		DEFAULT '0'	NOT NULL,
	permission		integer		DEFAULT '0'	NOT NULL,
	id		bigint unsigned			,
	PRIMARY KEY (rightid)
);
CREATE INDEX rights_1 on rights_tmp (groupid);

insert into rights_tmp select * from rights;
drop table rights;
alter table rights_tmp rename rights;