r34953 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34952‎ | r34953 | r34954 >
Date:07:43, 17 May 2008
Author:aaron
Status:old
Tags:
Comment:
Update PG
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/postgres/patch-fr_img_name.sql (added) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -2394,6 +2394,7 @@
23952395 $wgExtNewIndexes[] = array('flaggedpage_config', 'fpc_expiry', "$base/postgres/patch-expiry-index.sql" );
23962396 $wgExtNewTables[] = array( 'flaggedrevs_promote', "$base/postgres/patch-flaggedrevs_promote.sql" );
23972397 $wgExtNewTables[] = array( 'flaggedpages', "$base/postgres/patch-flaggedpages.sql" );
 2398+ $wgExtNewIndexes[] = array('flaggedrevs', 'key_timestamp', "$base/postgres/patch-fr_img_name.sql" );
23982399 }
23992400
24002401 return true;
Index: trunk/extensions/FlaggedRevs/postgres/patch-fr_img_name.sql
@@ -0,0 +1,13 @@
 2+BEGIN;
 3+
 4+ALTER TABLE flaggedrevs
 5+ -- Name of included image
 6+ ADD fr_img_name TEXT NULL default NULL,
 7+ -- Timestamp of file (when uploaded)
 8+ ADD fr_img_timestamp TIMESTAMPTZ NULL default NULL,
 9+ -- Statistically unique SHA-1 key
 10+ ADD fr_img_sha1 TEXT NULL default NULL;
 11+
 12+CREATE INDEX key_timestamp ON flaggedrevs (fr_img_sha1,fr_img_timestamp);
 13+
 14+COMMIT;
Property changes on: trunk/extensions/FlaggedRevs/postgres/patch-fr_img_name.sql
___________________________________________________________________
Added: svn:eol-style
115 + native
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql
@@ -4,28 +4,32 @@
55 BEGIN;
66
77 CREATE TABLE flaggedpages (
8 - fp_page_id INTEGER NOT NULL DEFAULT 0 ,
9 - fp_reviewed INTEGER NOT NULL DEFAULT 0 ,
10 - fp_stable INTEGER NULL,
11 - fp_quality INTEGER default NULL,
 8+ fp_page_id INTEGER NOT NULL DEFAULT 0,
 9+ fp_reviewed INTEGER NOT NULL DEFAULT 0,
 10+ fp_stable INTEGER NOT NULL DEFAULT 0,
 11+ fp_quality INTEGER default NULL,
1212 PRIMARY KEY (fp_page_id)
1313 );
1414 CREATE INDEX fp_reviewed_page ON flaggedpages (fp_reviewed,fp_page_id),
1515 CREATE INDEX fp_quality_page ON flaggedpages (fp_quality,fp_page_id)
1616
1717 CREATE TABLE flaggedrevs (
18 - fr_page_id INTEGER NOT NULL DEFAULT 0 ,
19 - fr_rev_id INTEGER NOT NULL DEFAULT 0 ,
20 - fr_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
21 - fr_timestamp TIMESTAMPTZ,
22 - fr_comment TEXT NOT NULL DEFAULT '',
23 - fr_quality INTEGER NOT NULL DEFAULT 0,
24 - fr_tags TEXT NOT NULL DEFAULT '',
25 - fr_text TEXT NOT NULL DEFAULT '',
26 - fr_flags TEXT NOT NULL,
 18+ fr_page_id INTEGER NOT NULL DEFAULT 0,
 19+ fr_rev_id INTEGER NOT NULL DEFAULT 0,
 20+ fr_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
 21+ fr_timestamp TIMESTAMPTZ,
 22+ fr_comment TEXT NOT NULL DEFAULT '',
 23+ fr_quality INTEGER NOT NULL DEFAULT 0,
 24+ fr_tags TEXT NOT NULL DEFAULT '',
 25+ fr_text TEXT NOT NULL DEFAULT '',
 26+ fr_flags TEXT NOT NULL,
 27+ fr_img_name TEXT NULL DEFAULT NULL,
 28+ fr_img_timestamp TIMESTAMPTZ NULL DEFAULT NULL,
 29+ fr_img_sha1 TEXT NULL DEFAULT NULL,
2730 PRIMARY KEY (fr_page_id,fr_rev_id)
2831 );
2932 CREATE INDEX fr_namespace_title ON flaggedrevs (fr_page_id,fr_quality,fr_rev_id);
 33+CREATE INDEX key_timestamp ON flaggedrevs (fr_img_sha1,fr_img_timestamp);
3034
3135 CREATE TABLE flaggedpage_config (
3236 fpc_page_id INTEGER NOT NULL PRIMARY KEY DEFAULT 0,
@@ -44,7 +48,7 @@
4549 );
4650
4751 CREATE TABLE flaggedimages (
48 - fi_rev_id INTEGER NOT NULL DEFAULT 0 ,
 52+ fi_rev_id INTEGER NOT NULL DEFAULT 0,
4953 fi_name TEXT NOT NULL,
5054 fi_img_timestamp TIMESTAMPTZ,
5155 fi_img_sha1 CHAR(64),

Status & tagging log