--- Used for storing page restrictions (i.e. protection levels)
CREATE TABLE /*$wgDBprefix*/page_restrictions (
+ pr_id INT UNIQUE IDENTITY,
pr_page INT NOT NULL REFERENCES /*$wgDBprefix*/page(page_id) ON DELETE CASCADE,
pr_type NVARCHAR(200) NOT NULL,
pr_level NVARCHAR(200) NOT NULL,
pr_cascade SMALLINT NOT NULL,
pr_user INT NULL,
pr_expiry DATETIME NULL,
- pr_id INT UNIQUE IDENTITY,
CONSTRAINT /*$wgDBprefix*/pr_pagetype PRIMARY KEY(pr_page,pr_type),
);
CREATE INDEX /*$wgDBprefix*/pr_page ON /*$wgDBprefix*/page_restrictions(pr_page);
CREATE TABLE /*_*/page_restrictions_tmp (
+ pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
pr_page int NOT NULL,
pr_type varbinary(60) NOT NULL,
pr_level varbinary(60) NOT NULL,
pr_cascade tinyint NOT NULL,
pr_user int NULL,
- pr_expiry varbinary(14) NULL,
- pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT
+ pr_expiry varbinary(14) NULL
);
CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions_tmp (pr_page,pr_type);
-- Used for storing page restrictions (i.e. protection levels)
CREATE TABLE /*_*/page_restrictions (
+ -- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)
+ pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
-- Page to apply restrictions to (Foreign Key to page).
pr_page int NOT NULL,
-- The protection type (edit, move, etc)
-- Field for future support of per-user restriction.
pr_user int NULL,
-- Field for time-limited protection.
- pr_expiry varbinary(14) NULL,
- -- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)
- pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT
+ pr_expiry varbinary(14) NULL
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type);