Index: trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql |
— | — | @@ -1,4 +1,3 @@ |
2 | | -ALTER TABLE /*_*/transcache MODIFY tc_time binary(14); |
3 | | -UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s"); |
| 2 | +UPDATE /*_*/transcache SET tc_time = strftime('%Y%m%d%H%M%S', datetime(1260465428, 'unixepoch')); |
4 | 3 | |
5 | 4 | INSERT INTO /*_*/updatelog VALUES ('convert transcache field'); |
Index: trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | CREATE TABLE /*_*/transcache ( |
354 | 354 | tc_url varbinary(255) NOT NULL, |
355 | 355 | tc_contents text, |
356 | | - tc_time binary(14) NOT NULL |
| 356 | + tc_time int NOT NULL |
357 | 357 | ) /*$wgDBTableOptions*/; |
358 | 358 | CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url); |
359 | 359 | |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -1350,7 +1350,7 @@ |
1351 | 1351 | wfOut( "...transcache tc_time already converted.\n" ); |
1352 | 1352 | return; |
1353 | 1353 | } else { |
1354 | | - wfOut( "Converting tc_time from int(11) to binary(14)... " ); |
| 1354 | + wfOut( "Converting tc_time from UNIX epoch to MediaWiki timestamp... " ); |
1355 | 1355 | $wgDatabase->sourceFile( archive( 'patch-tc-timestamp.sql' ) ); |
1356 | 1356 | wfOut( "ok\n" ); |
1357 | 1357 | } |