summaryrefslogtreecommitdiff
path: root/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql
blob: f9172b5ef1dbc65559c960dcdba74261a68b83e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--
-- Add iw_api and iw_wikiid to interwiki table
--


CREATE TABLE /*_*/interwiki_tmp (
  iw_prefix TEXT NOT NULL,
  iw_url BLOB NOT NULL,
  iw_api BLOB NOT NULL,
  iw_wikiid TEXT NOT NULL,
  iw_local INTEGER NOT NULL,
  iw_trans INTEGER NOT NULL default 0
) /*$wgDBTableOptions*/;

INSERT INTO /*_*/interwiki_tmp SELECT iw_prefix, iw_url, '', '', iw_local, iw_trans FROM /*_*/interwiki;
DROP TABLE /*_*/interwiki;
ALTER TABLE /*_*/interwiki_tmp RENAME TO /*_*/interwiki;

CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix);