http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99455
Revision: 99455
Author: raindrift
Date: 2011-10-11 01:07:20 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
added pagetriage checkouts table
Modified Paths:
--------------
trunk/extensions/PageTriage/sql/PageTriage.sql
Modified: trunk/extensions/PageTriage/sql/PageTriage.sql
===================================================================
--- trunk/extensions/PageTriage/sql/PageTriage.sql 2011-10-11 00:46:24 UTC
(rev 99454)
+++ trunk/extensions/PageTriage/sql/PageTriage.sql 2011-10-11 01:07:20 UTC
(rev 99455)
@@ -1,5 +1,6 @@
--- mapping table for user to pages
+-- mapping table for users to revisions
+-- this information persists forever.
CREATE TABLE /*_*/pagetriage (
ptr_user_id int UNSIGNED NOT NULL,
ptr_recentchanges_id int NOT NULL,
@@ -9,4 +10,17 @@
CREATE UNIQUE INDEX /*i*/ptr_user_rc ON /*_*/pagetriage
(ptr_user_id,ptr_recentchanges_id);
-- this stores when a page was checked. we'll be interested in that sometimes.
-CREATE INDEX /*i*/ptr_timestamp ON /*_*/pagetriage (ptr_timestamp);
\ No newline at end of file
+CREATE INDEX /*i*/ptr_timestamp ON /*_*/pagetriage (ptr_timestamp);
+
+-- This table exists to prevent concurrency problems when multiple people are
doing
+-- page triage at the same time.
+-- Unlike the above table, this one has rows deleted from it regularly.
+-- If it's cleared, it'll lead to edit conflicts for a few minutes but it's
not a big deal.
+CREATE TABLE /*_*/pagetriage_checkouts (
+ ptc_id int UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ ptc_user_id int UNSIGNED NOT NULL,
+ ptc_recentchanges_id int NOT NULL,
+ ptc_timestamp varbinary(14) NOT NULL
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/ptc_user_rc ON /*_*/pagetriage_checkouts
(ptc_user_id,ptc_recentchanges_id);
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs