summaryrefslogtreecommitdiff
path: root/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql')
-rw-r--r--maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql b/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql
new file mode 100644
index 00000000..f9172b5e
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-iw_api_and_wikiid.sql
@@ -0,0 +1,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); \ No newline at end of file