blob: 45416c3bea9a912fe9aa28d6c67bcb712c1248db (
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
30
31
32
33
34
35
36
|
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-pagelinks-drop-pl_title.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TEMPORARY TABLE /*_*/__temp__pagelinks AS
SELECT
pl_from,
pl_from_namespace,
pl_target_id
FROM /*_*/pagelinks;
DROP TABLE /*_*/pagelinks;
CREATE TABLE /*_*/pagelinks (
pl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
pl_target_id BIGINT UNSIGNED NOT NULL,
pl_from_namespace INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY(pl_from, pl_target_id)
);
INSERT INTO /*_*/pagelinks (
pl_from, pl_from_namespace, pl_target_id
)
SELECT
pl_from,
pl_from_namespace,
pl_target_id
FROM
/*_*/__temp__pagelinks;
DROP TABLE /*_*/__temp__pagelinks;
CREATE INDEX pl_target_id ON /*_*/pagelinks (pl_target_id, pl_from);
CREATE INDEX pl_backlinks_namespace_target_id ON /*_*/pagelinks (
pl_from_namespace, pl_target_id,
pl_from
);
|