r72130 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72129‎ | r72130 | r72131 >
Date:18:04, 1 September 2010
Author:reedy
Status:deferred
Tags:
Comment:
Need a PK using the user_anon_text, so needs to default to ''

Updated schema to match, do below to match

ALTER TABLE mw_article_assessment DROP PRIMARY KEY;
ALTER TABLE mw_article_assessment ALTER COLUMN aa_user_anon_token SET DEFAULT '';
ALTER TABLE mw_article_assessment ADD PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token);
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.sql
@@ -14,16 +14,16 @@
1515 aa_user_id integer NOT NULL,
1616 -- unique user identifier
1717 aa_user_text varchar(255) binary NOT NULL,
18 - aa_user_anon_token binary(32) DEFAULT NULL,
 18+ aa_user_anon_token binary(32) DEFAULT '',
1919 -- Foreign key to revision.rev_id
2020 aa_revision integer unsigned NOT NULL,
2121 -- MW Timestamp
22 - aa_timestamp binary(14) NOT NULL default '',
 22+ aa_timestamp binary(14) NOT NULL DEFAULT '',
2323 -- Rating info
2424 aa_rating_id int unsigned NOT NULL,
2525 aa_rating_value int unsigned NOT NULL,
2626 -- 1 vote per user per revision
27 - PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id)
 27+ PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token)
2828 ) /*$wgDBTableOptions*/;
2929 CREATE INDEX /*i*/aa_user_page_revision ON /*_*/article_assessment (aa_user_id, aa_page_id, aa_revision);
3030

Status & tagging log