Fixed updater borkage on SQLite from r59925 and r59926, tweaked explanation for this...
authorMax Semenik <maxsem@users.mediawiki.org>
Thu, 10 Dec 2009 17:42:12 +0000 (17:42 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Thu, 10 Dec 2009 17:42:12 +0000 (17:42 +0000)
maintenance/sqlite/archives/initial-indexes.sql
maintenance/sqlite/archives/patch-tc-timestamp.sql
maintenance/updaters.inc

index 9c038a1..25f9097 100644 (file)
@@ -352,7 +352,7 @@ DROP TABLE IF EXISTS /*_*/transcache;
 CREATE TABLE /*_*/transcache (
   tc_url varbinary(255) NOT NULL,
   tc_contents text,
-  tc_time binary(14) NOT NULL
+  tc_time int NOT NULL
 ) /*$wgDBTableOptions*/;
 CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url);
 
index 4d90cf3..8e54da2 100644 (file)
@@ -1,4 +1,3 @@
-ALTER TABLE /*_*/transcache MODIFY tc_time binary(14);
-UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s");
+UPDATE /*_*/transcache SET tc_time = strftime('%Y%m%d%H%M%S', datetime(1260465428, 'unixepoch'));
 
 INSERT INTO /*_*/updatelog VALUES ('convert transcache field');
index 4d926c2..478775c 100644 (file)
@@ -1350,7 +1350,7 @@ function do_update_transcache_field() {
                wfOut( "...transcache tc_time already converted.\n" );
                return;
        } else {
-               wfOut( "Converting tc_time from int(11) to binary(14)... " );
+               wfOut( "Converting tc_time from UNIX epoch to MediaWiki timestamp... " );
                $wgDatabase->sourceFile( archive( 'patch-tc-timestamp.sql' ) );
                wfOut( "ok\n" );
        }