r101151 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101150‎ | r101151 | r101152 >
Date:16:51, 28 October 2011
Author:mah
Status:resolved (Comments)
Tags:
Comment:
Fix Bug #30383 for Pg
Modified paths:
  • /trunk/phase3/includes/installer/PostgresUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/PostgresUpdater.php
@@ -108,6 +108,8 @@
109109 array( 'addPgField', 'logging', 'log_page', 'INTEGER' ),
110110 array( 'addPgField', 'interwiki', 'iw_api', "TEXT NOT NULL DEFAULT ''"),
111111 array( 'addPgField', 'interwiki', 'iw_wikiid', "TEXT NOT NULL DEFAULT ''"),
 112+ array( 'addPgField', 'revision', 'rev_sha1', "BYTEA NOT NULL DEFAULT ''" ),
 113+ array( 'addPgField', 'archive', 'ar_sha1', "BYTEA NOT NULL DEFAULT ''" ),
112114
113115 # type changes
114116 array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r101513Follow up r101151 — store hex representation of binary data in textmah19:02, 1 November 2011

Comments

#Comment by OverlordQ (talk | contribs)   15:52, 1 November 2011

I think all of the other existing sha1 fields (img_sha1, oi_sha1) are TEXT fields which is how I added it to r101397, so we should probably decide which way to go for these fields.

#Comment by MarkAHershberger (talk | contribs)   18:43, 1 November 2011

Is there a reason to prefer TEXT over BYTEA? It would seem to me that BYTEA is more natural for binary data.

#Comment by Brion VIBBER (talk | contribs)   18:47, 1 November 2011

Don't we store those as hexadecimal strings? BYTEA would seem a bit silly there. :)

#Comment by MarkAHershberger (talk | contribs)   18:59, 1 November 2011

hrm... must've missed the hex string bit or just misread it. TEXT it is then.

Status & tagging log