aboutsummaryrefslogtreecommitdiffstats
path: root/sql/sqlite/patch-ipblocks_restrictions-ir_value.sql
blob: 93e2245a47b6c584b2fbb2ea54e7afe5134aa94b (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_value.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 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);