r66928 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66927‎ | r66928 | r66929 >
Date:18:08, 26 May 2010
Author:aaron
Status:ok
Tags:
Comment:
* (bug 23671) Use BIGINTS for "INTEGER UNSIGNED"
* user field type consistency
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.sql
@@ -46,7 +46,7 @@
4747 -- Foreign key to revision.rev_id
4848 fr_rev_id integer unsigned NOT NULL,
4949 -- Foreign key to user.user_id
50 - fr_user int(5) NOT NULL,
 50+ fr_user integer unsigned NOT NULL,
5151 fr_timestamp char(14) NOT NULL,
5252 fr_comment mediumblob NOT NULL,
5353 -- Store the precedence level
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.pg.sql
@@ -4,10 +4,10 @@
55 BEGIN;
66
77 CREATE TABLE flaggedpages (
8 - fp_page_id INTEGER NOT NULL DEFAULT 0,
 8+ fp_page_id BIGINT NOT NULL DEFAULT 0,
99 fp_reviewed INTEGER NOT NULL DEFAULT 0,
1010 fp_pending_since TIMESTAMPTZ NULL,
11 - fp_stable INTEGER NOT NULL DEFAULT 0,
 11+ fp_stable BIGINT NOT NULL DEFAULT 0,
1212 fp_quality INTEGER NULL default NULL,
1313 PRIMARY KEY (fp_page_id)
1414 );
@@ -16,21 +16,21 @@
1717 CREATE INDEX fp_pending_since ON flaggedpages (fp_pending_since);
1818
1919 CREATE TABLE flaggedpage_pending (
20 - fpp_page_id INTEGER UNSIGNED NOT NULL,
 20+ fpp_page_id BIGINT NOT NULL,
2121 fpp_quality INTEGER NOT NULL,
22 - fpp_rev_id INTEGER UNSIGNED NOT NULL,
 22+ fpp_rev_id BIGINT NOT NULL,
2323 fpp_pending_since TIMESTAMPTZ NULL,
2424 PRIMARY KEY (fpp_page_id,fpp_quality)
2525 );
2626 CREATE INDEX fpp_quality_pending ON flaggedpage_pending (fpp_quality,fpp_pending_since);
2727
2828 CREATE TABLE flaggedrevs (
29 - fr_page_id INTEGER NOT NULL DEFAULT 0,
30 - fr_rev_id INTEGER NOT NULL DEFAULT 0,
31 - fr_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
 29+ fr_page_id BIGINT NOT NULL DEFAULT 0,
 30+ fr_rev_id BIGINT NOT NULL DEFAULT 0,
 31+ fr_user BIGINT NULL REFERENCES mwuser(user_id) ON DELETE SET NULL,
3232 fr_timestamp TIMESTAMPTZ,
3333 fr_comment TEXT NOT NULL DEFAULT '',
34 - fr_quality INTEGER NOT NULL DEFAULT 0,
 34+ fr_quality INTEGER NOT NULL DEFAULT 0,
3535 fr_tags TEXT NOT NULL DEFAULT '',
3636 fr_text TEXT NOT NULL DEFAULT '',
3737 fr_flags TEXT NOT NULL,
@@ -42,43 +42,43 @@
4343 CREATE INDEX page_qal_rev ON flaggedrevs (fr_page_id,fr_quality,fr_rev_id);
4444 CREATE INDEX fr_img_sha1 ON flaggedrevs (fr_img_sha1);
4545
46 -CREATE TABLE flaggedpage_config (
47 - fpc_page_id INTEGER NOT NULL PRIMARY KEY DEFAULT 0,
48 - fpc_select INTEGER NOT NULL,
49 - fpc_override INTEGER NOT NULL,
50 - fpc_level TEXT NULL,
51 - fpc_expiry TIMESTAMPTZ NULL
52 -);
53 -CREATE INDEX fpc_expiry ON flaggedpage_config (fpc_expiry);
54 -
5546 CREATE TABLE flaggedtemplates (
56 - ft_rev_id INTEGER NOT NULL DEFAULT 0 ,
 47+ ft_rev_id BIGINT NOT NULL DEFAULT 0 ,
5748 ft_namespace SMALLINT NOT NULL DEFAULT 0,
58 - ft_title TEXT NOT NULL DEFAULT '',
59 - ft_tmp_rev_id INTEGER NOT NULL DEFAULT 0,
 49+ ft_title TEXT NOT NULL DEFAULT '',
 50+ ft_tmp_rev_id BIGINT NOT NULL DEFAULT 0,
6051 PRIMARY KEY (ft_rev_id,ft_namespace,ft_title)
6152 );
6253
6354 CREATE TABLE flaggedimages (
64 - fi_rev_id INTEGER NOT NULL DEFAULT 0,
 55+ fi_rev_id BIGINT NOT NULL DEFAULT 0,
6556 fi_name TEXT NOT NULL DEFAULT '',
6657 -- MW timestamp
6758 fi_img_timestamp TIMESTAMPTZ NOT NULL,
68 - fi_img_sha1 CHAR(64) NOT NULL DEFAULT '',
 59+ fi_img_sha1 CHAR(64) NOT NULL DEFAULT '',
6960 PRIMARY KEY (fi_rev_id,fi_name)
7061 );
7162
 63+CREATE TABLE flaggedpage_config (
 64+ fpc_page_id BIGINT NOT NULL PRIMARY KEY DEFAULT 0,
 65+ fpc_select INTEGER NOT NULL,
 66+ fpc_override INTEGER NOT NULL,
 67+ fpc_level TEXT NULL,
 68+ fpc_expiry TIMESTAMPTZ NULL
 69+);
 70+CREATE INDEX fpc_expiry ON flaggedpage_config (fpc_expiry);
 71+
7272 CREATE TABLE flaggedrevs_tracking (
73 - ftr_from INTEGER NOT NULL DEFAULT 0,
74 - ftr_namespace SMALLINT NOT NULL DEFAULT 0,
 73+ ftr_from BIGINT NOT NULL DEFAULT 0,
 74+ ftr_namespace SMALLINT NOT NULL DEFAULT 0,
7575 ftr_title TEXT NOT NULL DEFAULT '',
7676 PRIMARY KEY (ftr_from,ftr_namespace,ftr_title)
7777 );
7878 CREATE INDEX namespace_title_from ON flaggedrevs_tracking (ftr_namespace,ftr_title,ftr_from);
7979
8080 CREATE TABLE flaggedrevs_promote (
81 - frp_user_id INTEGER NOT NULL PRIMARY KEY default 0,
82 - frp_user_params TEXT NOT NULL default ''
 81+ frp_user_id BIGINT NOT NULL PRIMARY KEY default 0,
 82+ frp_user_params TEXT NOT NULL default ''
8383 );
8484
8585 COMMIT;

Follow-up revisions

RevisionCommit summaryAuthorDate
r84387Backported r66928, r84365aaron15:11, 20 March 2011

Status & tagging log