1 CREATE TABLE /*_*/langlinks_tmp (
2 -- page_id of the referring page
3 ll_from
int unsigned
NOT NULL default 0,
5 -- Language code of the target
6 ll_lang
varbinary(20) NOT NULL default '',
8 -- Title of the target, including namespace
9 ll_title
varchar(255) binary NOT NULL default '',
10 PRIMARY KEY (ll_from
,ll_lang
)
11 ) /*$wgDBTableOptions*/;
13 INSERT INTO /*_*/langlinks_tmp
14 SELECT * FROM /*_*/langlinks
;
16 DROP TABLE /*_*/langlinks
;
18 ALTER TABLE /*_*/langlinks_tmp
RENAME TO /*_*/langlinks
;
20 -- Index for ApiQueryLangbacklinks
21 CREATE INDEX /*i*/ll_lang
ON /*_*/langlinks (ll_lang
, ll_title
);