From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre@archlinux.de>
Date: Sun, 8 Dec 2013 09:55:49 +0100
Subject: Update to MediaWiki 1.22.0

---
 .../sqlite/archives/patch-externallinks-el_id.sql     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 maintenance/sqlite/archives/patch-externallinks-el_id.sql

(limited to 'maintenance/sqlite/archives/patch-externallinks-el_id.sql')

diff --git a/maintenance/sqlite/archives/patch-externallinks-el_id.sql b/maintenance/sqlite/archives/patch-externallinks-el_id.sql
new file mode 100644
index 00000000..0aad4071
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-externallinks-el_id.sql
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS /*_*/externallinks_tmp;
+
+CREATE TABLE /*$wgDBprefix*/externallinks_tmp (
+   el_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+   el_from int unsigned NOT NULL default 0,
+   el_to blob NOT NULL,
+   el_index blob NOT NULL
+);
+
+INSERT OR IGNORE INTO /*_*/externallinks_tmp (el_from, el_to, el_index) SELECT
+    el_from, el_to, el_index FROM /*_*/externallinks;
+
+DROP TABLE /*_*/externallinks;
+
+ALTER TABLE /*_*/externallinks_tmp RENAME TO /*_*/externallinks;
+
+CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40));
+CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from);
+CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60));
\ No newline at end of file
-- 
cgit v1.2.3-54-g00ecf

