wiki.techinc.nl/maintenance/archives/patch-ipblocks_restrictions-table.sql
David Barratt c2bd4b12c7 Make Schema changes for Partial Blocks
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
2018-09-07 15:25:49 -07:00

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);