r67963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67962‎ | r67963 | r67964 >
Date:21:47, 13 June 2010
Author:aaron
Status:deferred (Comments)
Tags:schema 
Comment:
Changed fi_img_timestamp to allow NULL values (for dead image links). Currently '' is used for mysql, which becomes wtf padding garbage.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/archives/patch-fi_img_timestamp.sql (added) (history)
  • /trunk/extensions/FlaggedRevs/postgres/patch-fi_img_timestamp.sql (added) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.sql
@@ -94,7 +94,7 @@
9595 -- Name of included image
9696 fi_name varchar(255) binary NOT NULL default '',
9797 -- Timestamp of image used when reviewed
98 - fi_img_timestamp char(14) NOT NULL default '',
 98+ fi_img_timestamp char(14) NULL,
9999 -- Statistically unique SHA-1 key
100100 fi_img_sha1 varbinary(32) NOT NULL default '',
101101
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql
@@ -53,8 +53,7 @@
5454 CREATE TABLE flaggedimages (
5555 fi_rev_id BIGINT NOT NULL DEFAULT 0,
5656 fi_name TEXT NOT NULL DEFAULT '',
57 - -- MW timestamp
58 - fi_img_timestamp TIMESTAMPTZ NOT NULL,
 57+ fi_img_timestamp TIMESTAMPTZ NULL DEFAULT NULL,
5958 fi_img_sha1 CHAR(64) NOT NULL DEFAULT '',
6059 PRIMARY KEY (fi_rev_id,fi_name)
6160 );
Index: trunk/extensions/FlaggedRevs/archives/patch-fi_img_timestamp.sql
@@ -0,0 +1,6 @@
 2+-- Fix bad fi_img_timestamp definition
 3+ALTER TABLE /*$wgDBprefix*/flaggedimages
 4+ CHANGE fi_img_timestamp fi_img_timestamp char(14) NULL;
 5+-- Move bad values over to NULL
 6+UPDATE /*$wgDBprefix*/flaggedimages
 7+ SET fi_img_timestamp = NULL WHERE fi_img_timestamp = '0\0\0\0\0\0\0\0\0\0\0\0\0\0';
Property changes on: trunk/extensions/FlaggedRevs/archives/patch-fi_img_timestamp.sql
___________________________________________________________________
Name: svn:eol-style
18 + native
Index: trunk/extensions/FlaggedRevs/postgres/patch-fi_img_timestamp.sql
@@ -0,0 +1,6 @@
 2+BEGIN;
 3+
 4+ALTER TABLE flaggedimages
 5+ CHANGE fi_img_timestamp fi_img_timestamp TIMESTAMPTZ NULL;
 6+
 7+COMMIT;
Property changes on: trunk/extensions/FlaggedRevs/postgres/patch-fi_img_timestamp.sql
___________________________________________________________________
Name: svn:eol-style
18 + native

Comments

#Comment by Aaron Schulz (talk | contribs)   00:04, 30 June 2010

Followed up in r68737.

Status & tagging log