https://www.mediawiki.org/wiki/Special:Code/MediaWiki/105566
Revision: 105566 Author: yuvipanda Date: 2011-12-08 17:48:25 +0000 (Thu, 08 Dec 2011) Log Message: ----------- Added ids (for pagination) to schema Modified Paths: -------------- trunk/extensions/SelectionSifter/schema/log.sql trunk/extensions/SelectionSifter/schema/project_stats.sql trunk/extensions/SelectionSifter/schema/ratings.sql trunk/extensions/SelectionSifter/schema/selections.sql Modified: trunk/extensions/SelectionSifter/schema/log.sql =================================================================== --- trunk/extensions/SelectionSifter/schema/log.sql 2011-12-08 17:28:12 UTC (rev 105565) +++ trunk/extensions/SelectionSifter/schema/log.sql 2011-12-08 17:48:25 UTC (rev 105566) @@ -2,6 +2,9 @@ -- Replace /*$wgDBTableOptions*/ with the correct options CREATE TABLE IF NOT EXISTS /*_*/assessment_changelog ( + l_id int not null auto_increment, + -- id, for pagination + l_project varchar(63) not null, -- project name @@ -28,7 +31,8 @@ -- a wiki-format timestamp primary key (l_project, l_namespace, l_article, l_action, l_timestamp), - key (l_article, l_namespace) + key (l_article, l_namespace), + unique key (l_id) ) /*$wgDBTableOptions*/; CREATE INDEX /*i*/l_project ON /*_*/assessment_changelog (l_project); Modified: trunk/extensions/SelectionSifter/schema/project_stats.sql =================================================================== --- trunk/extensions/SelectionSifter/schema/project_stats.sql 2011-12-08 17:28:12 UTC (rev 105565) +++ trunk/extensions/SelectionSifter/schema/project_stats.sql 2011-12-08 17:48:25 UTC (rev 105566) @@ -2,6 +2,8 @@ -- Replace /*$wgDBTableOptions*/ with the correct options CREATE TABLE IF NOT EXISTS /*_*/project_stats ( + ps_id int not null auto_increment, + -- id, for pagination ps_project varchar(63) not null, -- project name @@ -43,7 +45,9 @@ ps_icount int unsigned default 0, -- how many pages have importance assessments in the project - primary key (ps_project, ps_quality) + primary key (ps_project, ps_quality), + key (ps_id) ) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/ps_id ON /*_*/project_stats (ps_id); CREATE INDEX /*i*/ps_project ON /*_*/project_stats (ps_project); Modified: trunk/extensions/SelectionSifter/schema/ratings.sql =================================================================== --- trunk/extensions/SelectionSifter/schema/ratings.sql 2011-12-08 17:28:12 UTC (rev 105565) +++ trunk/extensions/SelectionSifter/schema/ratings.sql 2011-12-08 17:48:25 UTC (rev 105566) @@ -2,6 +2,9 @@ -- Replace /*$wgDBTableOptions*/ with the correct options CREATE TABLE IF NOT EXISTS /*_*/ratings ( + r_id int not null auto_increment, + -- id, for pagination + r_project varchar(63) not null, -- project name @@ -26,8 +29,10 @@ -- time when importance rating was assigned -- a wiki-style timestamp - primary key (r_project, r_namespace, r_article) + primary key (r_project, r_namespace, r_article), + key (r_id) ) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/r_id ON /*_*/ratings (r_id); CREATE INDEX /*i*/r_article ON /*_*/ratings (r_namespace, r_article); CREATE INDEX /*i*/r_project ON /*_*/ratings (r_project); Modified: trunk/extensions/SelectionSifter/schema/selections.sql =================================================================== --- trunk/extensions/SelectionSifter/schema/selections.sql 2011-12-08 17:28:12 UTC (rev 105565) +++ trunk/extensions/SelectionSifter/schema/selections.sql 2011-12-08 17:48:25 UTC (rev 105566) @@ -2,6 +2,9 @@ -- Replace /*$wgDBTableOptions*/ with the correct options CREATE TABLE IF NOT EXISTS /*_*/selections ( + s_id int not null auto_increment, + -- id, for pagination + s_selection_name varchar(63) not null, -- project name @@ -17,7 +20,8 @@ s_revision int unsigned, -- manually set revision - primary key (s_selection_name, s_namespace, s_article) + primary key (s_selection_name, s_namespace, s_article), + unique key (s_id) ) /*$wgDBTableOptions*/; CREATE INDEX /*i*/s_selection_name ON /*_*/selections (s_selection_name); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs