r34285 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34284‎ | r34285 | r34286 >
Date:00:04, 6 May 2008
Author:aaron
Status:old
Tags:
Comment:
Do PG
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/postgres/patch-flaggedpages.sql (added) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -197,7 +197,7 @@
198198 # Load unreviewed pages list
199199 $wgSpecialPages['UnreviewedPages'] = 'UnreviewedPages';
200200 $wgAutoloadClasses['UnreviewedPages'] = $dir . 'FlaggedRevsPage.php';
201 -# Load in need of re-review pages list
 201+# Load "in need of re-review" pages list
202202 $wgSpecialPages['OldReviewedPages'] = 'OldReviewedPages';
203203 $wgAutoloadClasses['OldReviewedPages'] = $dir . 'FlaggedRevsPage.php';
204204 # Load reviewed pages list
@@ -209,7 +209,7 @@
210210 # Stable version config
211211 $wgSpecialPages['Stabilization'] = 'Stabilization';
212212 $wgAutoloadClasses['Stabilization'] = $dir . 'FlaggedRevsPage.php';
213 -# Too oversee quality revisions
 213+# To oversee quality revisions
214214 $wgSpecialPages['QualityOversight'] = 'QualityOversight';
215215 $wgAutoloadClasses['QualityOversight'] = $dir . 'FlaggedRevsPage.php';
216216
@@ -334,6 +334,7 @@
335335 $wgExtPGNewFields[] = array('flaggedpage_config', 'fpc_expiry', "TIMESTAMPTZ NULL" );
336336 $wgExtNewIndexes[] = array('flaggedpage_config', 'fpc_expiry', "$base/postgres/patch-expiry-index.sql" );
337337 $wgExtNewTables[] = array( 'flaggedrevs_promote', "$base/postgres/patch-flaggedrevs_promote.sql" );
 338+ $wgExtNewTables[] = array( 'flaggedpages', "$base/postgres/patch-flaggedpages.sql" );
338339 }
339340
340341 return true;
Index: trunk/extensions/FlaggedRevs/postgres/patch-flaggedpages.sql
@@ -0,0 +1,20 @@
 2+BEGIN;
 3+
 4+CREATE TABLE flaggedpages (
 5+ fp_page_id INTEGER NOT NULL DEFAULT 0 ,
 6+ fp_reviewed INTEGER NULL,
 7+ fp_stable INTEGER NULL,
 8+ fp_quality INTEGER default NULL,
 9+ PRIMARY KEY (fp_page_id)
 10+);
 11+CREATE INDEX fp_reviewed_page ON flaggedpages (fp_reviewed,fp_page_id),
 12+CREATE INDEX fp_quality_page ON flaggedpages (fp_quality,fp_page_id)
 13+
 14+-- Migrate old page_ext hacks over
 15+INSERT INTO /*$wgDBprefix*/flaggedpages (fp_page_id,fp_reviewed,fp_stable,fp_quality)
 16+SELECT page_id,page_ext_reviewed,page_ext_stable,page_ext_quality FROM /*$wgDBprefix*/page
 17+WHERE page_ext_stable IS NOT NULL;
 18+
 19+-- Leave the old fields and indexes for now
 20+
 21+COMMIT;
\ No newline at end of file
Property changes on: trunk/extensions/FlaggedRevs/postgres/patch-flaggedpages.sql
___________________________________________________________________
Added: svn:eol-style
122 + native
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.sql
@@ -1,5 +1,4 @@
2 -
 2+-- (c) Aaron Schulz, 2007
33 -- Table structure for table `Flagged Revisions`
44 -- Replace /*$wgDBprefix*/ with the proper prefix
55
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql
@@ -56,12 +56,4 @@
5757 frp_user_params TEXT NOT NULL default ''
5858 );
5959
60 -ALTER TABLE page
61 - ADD page_ext_reviewed INTEGER NULL,
62 - ADD page_ext_stable INTEGER NULL,
63 - ADD page_ext_quality SMALLINT DEFAULT NULL;
64 -
65 -CREATE INDEX ext_namespace_reviewed ON page (page_namespace,page_ext_reviewed,page_id);
66 -CREATE INDEX ext_namespace_quality ON page (page_namespace,page_ext_quality,page_title);
67 -
6860 COMMIT;

Status & tagging log