summaryrefslogtreecommitdiff
path: root/maintenance/archives
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/archives
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'maintenance/archives')
-rw-r--r--maintenance/archives/patch-archive_ar_revid.sql3
-rw-r--r--maintenance/archives/patch-image_reditects.sql0
-rw-r--r--maintenance/archives/patch-math.sql28
-rw-r--r--maintenance/archives/patch-page_no_title_convert.sql0
-rw-r--r--maintenance/archives/patch-profiling.sql2
-rw-r--r--maintenance/archives/patch-up_property.sql4
-rw-r--r--maintenance/archives/patch-uploadstash.sql49
-rw-r--r--maintenance/archives/patch-user-newtalk-timestamp-null.sql1
-rw-r--r--maintenance/archives/patch-user_email_index.sql1
-rw-r--r--maintenance/archives/patch-user_former_groups.sql9
-rw-r--r--maintenance/archives/patch-user_last_timestamp.sql2
-rw-r--r--maintenance/archives/upgradeLogging.php21
12 files changed, 87 insertions, 33 deletions
diff --git a/maintenance/archives/patch-archive_ar_revid.sql b/maintenance/archives/patch-archive_ar_revid.sql
index 67ee97b1..3b3fdee6 100644
--- a/maintenance/archives/patch-archive_ar_revid.sql
+++ b/maintenance/archives/patch-archive_ar_revid.sql
@@ -1,4 +1,3 @@
-- Hopefully temporary index.
-- For https://bugzilla.wikimedia.org/show_bug.cgi?id=21279
-ALTER TABLE /*$wgDBprefix*/archive
- ADD INDEX ar_revid ( ar_rev_id ); \ No newline at end of file
+CREATE INDEX /*i*/ar_revid ON /*$wgDBprefix*/archive ( ar_rev_id ); \ No newline at end of file
diff --git a/maintenance/archives/patch-image_reditects.sql b/maintenance/archives/patch-image_reditects.sql
deleted file mode 100644
index e69de29b..00000000
--- a/maintenance/archives/patch-image_reditects.sql
+++ /dev/null
diff --git a/maintenance/archives/patch-math.sql b/maintenance/archives/patch-math.sql
deleted file mode 100644
index 1d4b90e1..00000000
--- a/maintenance/archives/patch-math.sql
+++ /dev/null
@@ -1,28 +0,0 @@
--- Creates table math used for caching TeX blocks. Needs to be run
--- on old installations when adding TeX support (2002-12-26)
--- Or, TeX can be disabled via $wgUseTeX=false in LocalSettings.php
-
--- Note: math table has changed, and this script needs to be run again
--- to create it. (2003-02-02)
-
-DROP TABLE IF EXISTS /*$wgDBprefix*/math;
-CREATE TABLE /*$wgDBprefix*/math (
- -- Binary MD5 hash of the latex fragment, used as an identifier key.
- math_inputhash varbinary(16) NOT NULL,
-
- -- Not sure what this is, exactly...
- math_outputhash varbinary(16) NOT NULL,
-
- -- texvc reports how well it thinks the HTML conversion worked;
- -- if it's a low level the PNG rendering may be preferred.
- math_html_conservativeness tinyint NOT NULL,
-
- -- HTML output from texvc, if any
- math_html text,
-
- -- MathML output from texvc, if any
- math_mathml text,
-
- UNIQUE KEY math_inputhash (math_inputhash)
-
-) /*$wgDBTableOptions*/;
diff --git a/maintenance/archives/patch-page_no_title_convert.sql b/maintenance/archives/patch-page_no_title_convert.sql
deleted file mode 100644
index e69de29b..00000000
--- a/maintenance/archives/patch-page_no_title_convert.sql
+++ /dev/null
diff --git a/maintenance/archives/patch-profiling.sql b/maintenance/archives/patch-profiling.sql
index 29663341..0a0e4e1a 100644
--- a/maintenance/archives/patch-profiling.sql
+++ b/maintenance/archives/patch-profiling.sql
@@ -9,4 +9,4 @@ CREATE TABLE /*_*/profiling (
pf_server varchar(30) NOT NULL default ''
) ENGINE=HEAP;
-CREATE UNIQUE INDEX /*i*/pf_name_server ON /*_*/profiling (pf_name, pf_server) \ No newline at end of file
+CREATE UNIQUE INDEX /*i*/pf_name_server ON /*_*/profiling (pf_name, pf_server); \ No newline at end of file
diff --git a/maintenance/archives/patch-up_property.sql b/maintenance/archives/patch-up_property.sql
new file mode 100644
index 00000000..742841e4
--- /dev/null
+++ b/maintenance/archives/patch-up_property.sql
@@ -0,0 +1,4 @@
+-- Increase the length of up_property from 32 -> 255 bytes. Bug 19408
+
+ALTER TABLE /*_*/user_properties
+ MODIFY up_property varbinary(255);
diff --git a/maintenance/archives/patch-uploadstash.sql b/maintenance/archives/patch-uploadstash.sql
new file mode 100644
index 00000000..2512076f
--- /dev/null
+++ b/maintenance/archives/patch-uploadstash.sql
@@ -0,0 +1,49 @@
+--
+-- Store information about newly uploaded files before they're
+-- moved into the actual filestore
+--
+CREATE TABLE /*_*/uploadstash (
+ us_id int unsigned NOT NULL PRIMARY KEY auto_increment,
+
+ -- the user who uploaded the file.
+ us_user int unsigned NOT NULL,
+
+ -- file key. this is how applications actually search for the file.
+ -- this might go away, or become the primary key.
+ us_key varchar(255) NOT NULL,
+
+ -- the original path
+ us_orig_path varchar(255) NOT NULL,
+
+ -- the temporary path at which the file is actually stored
+ us_path varchar(255) NOT NULL,
+
+ -- which type of upload the file came from (sometimes)
+ us_source_type varchar(50),
+
+ -- the date/time on which the file was added
+ us_timestamp varbinary(14) not null,
+
+ us_status varchar(50) not null,
+
+ -- file properties from File::getPropsFromPath. these may prove unnecessary.
+ --
+ us_size int unsigned NOT NULL,
+ -- this hash comes from File::sha1Base36(), and is 31 characters
+ us_sha1 varchar(31) NOT NULL,
+ us_mime varchar(255),
+ -- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table
+ us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
+ -- image-specific properties
+ us_image_width int unsigned,
+ us_image_height int unsigned,
+ us_image_bits smallint unsigned
+
+) /*$wgDBTableOptions*/;
+
+-- sometimes there's a delete for all of a user's stuff.
+CREATE INDEX /*i*/us_user ON /*_*/uploadstash (us_user);
+-- pick out files by key, enforce key uniqueness
+CREATE UNIQUE INDEX /*i*/us_key ON /*_*/uploadstash (us_key);
+-- the abandoned upload cleanup script needs this
+CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp);
diff --git a/maintenance/archives/patch-user-newtalk-timestamp-null.sql b/maintenance/archives/patch-user-newtalk-timestamp-null.sql
new file mode 100644
index 00000000..7234362d
--- /dev/null
+++ b/maintenance/archives/patch-user-newtalk-timestamp-null.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/user_newtalk MODIFY user_last_timestamp varbinary(14) NULL default NULL;
diff --git a/maintenance/archives/patch-user_email_index.sql b/maintenance/archives/patch-user_email_index.sql
new file mode 100644
index 00000000..6a3d6208
--- /dev/null
+++ b/maintenance/archives/patch-user_email_index.sql
@@ -0,0 +1 @@
+CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50));
diff --git a/maintenance/archives/patch-user_former_groups.sql b/maintenance/archives/patch-user_former_groups.sql
new file mode 100644
index 00000000..ed18b2b6
--- /dev/null
+++ b/maintenance/archives/patch-user_former_groups.sql
@@ -0,0 +1,9 @@
+-- Stores the groups the user has once belonged to.
+-- The user may still belong these groups. Check user_groups.
+CREATE TABLE /*_*/user_former_groups (
+ -- Key to user_id
+ ufg_user int unsigned NOT NULL default 0,
+ ufg_group varbinary(16) NOT NULL default ''
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group);
diff --git a/maintenance/archives/patch-user_last_timestamp.sql b/maintenance/archives/patch-user_last_timestamp.sql
index b6d5f0f3..e5f85bf1 100644
--- a/maintenance/archives/patch-user_last_timestamp.sql
+++ b/maintenance/archives/patch-user_last_timestamp.sql
@@ -1,3 +1,3 @@
-- For getting diff since last view
ALTER TABLE /*$wgDBprefix*/user_newtalk
- ADD user_last_timestamp binary(14) NOT NULL default '';
+ ADD user_last_timestamp varbinary(14) NULL default NULL;
diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php
index 54a82c09..1765bd9f 100644
--- a/maintenance/archives/upgradeLogging.php
+++ b/maintenance/archives/upgradeLogging.php
@@ -2,6 +2,21 @@
/**
* Replication-safe online upgrade script for log_id/log_deleted
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
* @file
* @ingroup MaintenanceArchive
*/
@@ -9,6 +24,10 @@
require( dirname( __FILE__ ) . '/../commandLine.inc' );
class UpdateLogging {
+
+ /**
+ * @var DatabaseBase
+ */
var $dbw;
var $batchSize = 1000;
var $minTs = false;
@@ -145,7 +164,7 @@ EOT;
$this->dbw->insert( $dstTable, $batch, __METHOD__ );
$numRowsCopied += count( $batch );
- wfWaitForSlaves( 5 );
+ wfWaitForSlaves();
}
echo "Copied $numRowsCopied rows\n";
}