Update the database schema so a block can be switched between a sitewide and partial block. Also add the restrictions table for specifiying the partial blocks. Bug: T197144 Change-Id: I4a725312c4b980a1b14e5ca826069fa2278a5913
11 lines
370 B
SQL
11 lines
370 B
SQL
-- For partial block restrictions --
|
|
|
|
CREATE TABLE /*_*/ipblocks_restrictions (
|
|
ir_ipb_id int NOT NULL,
|
|
ir_type tinyint NOT NULL,
|
|
ir_value int NOT NULL,
|
|
PRIMARY KEY (ir_ipb_id, ir_type, ir_value)
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
-- Index to query restrictions by the page or namespace.
|
|
CREATE INDEX /*i*/ir_type_value ON /*_*/ipblocks_restrictions (ir_type, ir_value);
|