r59925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59924‎ | r59925 | r59926 >
Date:05:39, 10 December 2009
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Followup to r59869, add to MySQL section, and copy patch to SQLite directory
Modified paths:
  • /trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql (added) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql
@@ -0,0 +1,4 @@
 2+ALTER TABLE /*_*/transcache MODIFY tc_time varchar(14);
 3+UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s");
 4+
 5+INSERT INTO /*_*/updatelog VALUES ('convert transcache field');
Property changes on: trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql
___________________________________________________________________
Name: svn:eol-style
16 + native
Index: trunk/phase3/maintenance/updaters.inc
@@ -165,6 +165,7 @@
166166 array( 'add_index', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
167167 array( 'add_index', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
168168 array( 'add_field', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
 169+ array( 'do_update_transcache_field' ),
169170 // A field changed name mid-release cycle, so fix it for anyone using
170171 // trunk
171172 array( 'rename_eu_wiki_id' ),
Index: trunk/phase3/maintenance/tables.sql
@@ -1095,7 +1095,7 @@
10961096 CREATE TABLE /*_*/transcache (
10971097 tc_url varbinary(255) NOT NULL,
10981098 tc_contents text,
1099 - tc_time int NOT NULL
 1099+ tc_time binary(14) NOT NULL
11001100 ) /*$wgDBTableOptions*/;
11011101
11021102 CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url);

Follow-up revisions

RevisionCommit summaryAuthorDate
r59926Addendum to r59925, fix remaining straggling files that set rc_time to intoverlordq10:10, 10 December 2009
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
r59869Followup to r59818, change transcache timestamp field to be consistent with o...overlordq02:26, 9 December 2009

Comments

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

Heyyyyy! Unlike other dinosaurs supported by MW, SQLite needs no installation nor administration, and comes with PHP by default. You can actually CHECK if your changes work or not.

  1. The only part of ALTER TABLE supported is ADD COLUMN
  2. There's no such type as varchar - luckily it makes no difference due to SQLite's dynamic typing.
  3. Nor it has those funky time/date functions.

Will fix this mess shortly.

Status & tagging log