aboutsummaryrefslogtreecommitdiffstats
path: root/sql/sqlite/patch-ipblocks_restrictions-ir_ipb_id.sql
blob: b1defaee4cd3dac76191425c566e5de24ea9e92c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-ipblocks_restrictions-ir_ipb_id.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TEMPORARY TABLE /*_*/__temp__ipblocks_restrictions AS
SELECT
  ir_ipb_id,
  ir_type,
  ir_value
FROM /*_*/ipblocks_restrictions;
DROP TABLE /*_*/ipblocks_restrictions;


CREATE TABLE /*_*/ipblocks_restrictions (
    ir_ipb_id INTEGER UNSIGNED NOT NULL,
    ir_type SMALLINT NOT NULL,
    ir_value INTEGER UNSIGNED NOT NULL,
    PRIMARY KEY(ir_ipb_id, ir_type, ir_value)
  );
INSERT INTO /*_*/ipblocks_restrictions (ir_ipb_id, ir_type, ir_value)
SELECT
  ir_ipb_id,
  ir_type,
  ir_value
FROM
  /*_*/__temp__ipblocks_restrictions;
DROP TABLE /*_*/__temp__ipblocks_restrictions;

CREATE INDEX ir_type_value ON /*_*/ipblocks_restrictions (ir_type, ir_value);