r59926 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59925‎ | r59926 | r59927 >
Date:10:10, 10 December 2009
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Addendum to r59925, fix remaining straggling files that set rc_time to int
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-tc-timestamp.sql (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-transcache.sql (modified) (history)
  • /trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql (modified) (history)
  • /trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-transcache.sql
@@ -1,7 +1,7 @@
22 CREATE TABLE /*$wgDBprefix*/transcache (
33 tc_url varbinary(255) NOT NULL,
44 tc_contents TEXT,
5 - tc_time INT NOT NULL,
 5+ tc_time binary(14) NOT NULL,
66 UNIQUE INDEX tc_url_idx(tc_url)
77 ) /*$wgDBTableOptions*/;
88
Index: trunk/phase3/maintenance/archives/patch-tc-timestamp.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE /*_*/transcache MODIFY tc_time varchar(14);
 2+ALTER TABLE /*_*/transcache MODIFY tc_time binary(14);
33 UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s");
44
55 INSERT INTO /*_*/updatelog VALUES ('convert transcache field');
Index: trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE /*_*/transcache MODIFY tc_time varchar(14);
 2+ALTER TABLE /*_*/transcache MODIFY tc_time binary(14);
33 UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s");
44
55 INSERT INTO /*_*/updatelog VALUES ('convert transcache field');
Index: trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql
@@ -352,7 +352,7 @@
353353 CREATE TABLE /*_*/transcache (
354354 tc_url varbinary(255) NOT NULL,
355355 tc_contents text,
356 - tc_time int NOT NULL
 356+ tc_time binary(14) NOT NULL
357357 ) /*$wgDBTableOptions*/;
358358 CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url);
359359
Index: trunk/phase3/maintenance/updaters.inc
@@ -1350,7 +1350,7 @@
13511351 wfOut( "...transcache tc_time already converted.\n" );
13521352 return;
13531353 } else {
1354 - wfOut( "Converting tc_time from int(11) to varchar(13)... " );
 1354+ wfOut( "Converting tc_time from int(11) to binary(14)... " );
13551355 $wgDatabase->sourceFile( archive( 'patch-tc-timestamp.sql' ) );
13561356 wfOut( "ok\n" );
13571357 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r59932Fixed updater borkage on SQLite from r59925 and r59926, tweaked explanation f...maxsem17:42, 10 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59925Followup to r59869, add to MySQL section, and copy patch to SQLite directoryoverlordq05:39, 10 December 2009

Comments

#Comment by MaxSem (talk | contribs)   16:10, 10 December 2009

Cough, initial-indexes.sql is for upgrades from 1.13 to 1.14 and nothing more.

Status & tagging log