1 -- For partial block restrictions --
3 CREATE TABLE ipblocks_restrictions (
4 ir_ipb_id
INTEGER NOT NULL REFERENCES ipblocks(ipb_id
) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
5 ir_type
SMALLINT NOT NULL,
6 ir_value
INTEGER NOT NULL,
7 PRIMARY KEY (ir_ipb_id
, ir_type
, ir_value
)
10 -- Index to query restrictions by the page or namespace.
11 CREATE INDEX /*i*/ir_type_value
ON /*_*/ipblocks_restrictions (ir_type
, ir_value
);