patch-ipblocks_restrictions-table.sql 433 B

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