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);
-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');
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" );
}