From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre@archlinux.de>
Date: Mon, 12 Aug 2013 09:28:15 +0200
Subject: Update to MediaWiki 1.21.1

---
 .../sqlite/archives/patch-drop-ss_admins.sql       | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 maintenance/sqlite/archives/patch-drop-ss_admins.sql

(limited to 'maintenance/sqlite/archives/patch-drop-ss_admins.sql')

diff --git a/maintenance/sqlite/archives/patch-drop-ss_admins.sql b/maintenance/sqlite/archives/patch-drop-ss_admins.sql
new file mode 100644
index 00000000..9951e17e
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-drop-ss_admins.sql
@@ -0,0 +1,22 @@
+-- field is deprecated and no longer updated as of 1.5
+CREATE TABLE /*_*/site_stats_tmp (
+  ss_row_id int unsigned NOT NULL,
+  ss_total_views bigint unsigned default 0,
+  ss_total_edits bigint unsigned default 0,
+  ss_good_articles bigint unsigned default 0,
+  ss_total_pages bigint default '-1',
+  ss_users bigint default '-1',
+  ss_active_users bigint default '-1',
+  ss_images int default 0
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/site_stats_tmp
+	SELECT ss_row_id, ss_total_views, ss_total_edits, ss_good_articles,
+		ss_total_pages, ss_users, ss_active_users, ss_images
+		FROM /*_*/site_stats;
+
+DROP TABLE /*_*/site_stats;
+
+ALTER TABLE /*_*/site_stats_tmp RENAME TO /*_*/site_stats;
+
+CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
\ No newline at end of file
-- 
cgit v1.2.3-54-g00ecf

