r99455 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99454‎ | r99455 | r99456 >
Date:01:07, 11 October 2011
Author:raindrift
Status:deferred
Tags:
Comment:
added pagetriage checkouts table
Modified paths:
  • /trunk/extensions/PageTriage/sql/PageTriage.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/PageTriage/sql/PageTriage.sql
@@ -1,5 +1,6 @@
22
 3+-- mapping table for users to revisions
 4+-- this information persists forever.
35 CREATE TABLE /*_*/pagetriage (
46 ptr_user_id int UNSIGNED NOT NULL,
57 ptr_recentchanges_id int NOT NULL,
@@ -9,4 +10,17 @@
1011 CREATE UNIQUE INDEX /*i*/ptr_user_rc ON /*_*/pagetriage (ptr_user_id,ptr_recentchanges_id);
1112
1213 -- this stores when a page was checked. we'll be interested in that sometimes.
13 -CREATE INDEX /*i*/ptr_timestamp ON /*_*/pagetriage (ptr_timestamp);
\ No newline at end of file
 14+CREATE INDEX /*i*/ptr_timestamp ON /*_*/pagetriage (ptr_timestamp);
 15+
 16+-- This table exists to prevent concurrency problems when multiple people are doing
 17+-- page triage at the same time.
 18+-- Unlike the above table, this one has rows deleted from it regularly.
 19+-- If it's cleared, it'll lead to edit conflicts for a few minutes but it's not a big deal.
 20+CREATE TABLE /*_*/pagetriage_checkouts (
 21+ ptc_id int UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
 22+ ptc_user_id int UNSIGNED NOT NULL,
 23+ ptc_recentchanges_id int NOT NULL,
 24+ ptc_timestamp varbinary(14) NOT NULL
 25+) /*$wgDBTableOptions*/;
 26+
 27+CREATE UNIQUE INDEX /*i*/ptc_user_rc ON /*_*/pagetriage_checkouts (ptc_user_id,ptc_recentchanges_id);

Follow-up revisions

RevisionCommit summaryAuthorDate
r99499Changed user_id to user for consistency with core...raindrift17:09, 11 October 2011

Status & tagging log