r105566 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105565‎ | r105566 | r105567 >
Date:17:48, 8 December 2011
Author:yuvipanda
Status:deferred
Tags:
Comment:
Added ids (for pagination) to schema
Modified paths:
  • /trunk/extensions/SelectionSifter/schema/log.sql (modified) (history)
  • /trunk/extensions/SelectionSifter/schema/project_stats.sql (modified) (history)
  • /trunk/extensions/SelectionSifter/schema/ratings.sql (modified) (history)
  • /trunk/extensions/SelectionSifter/schema/selections.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/SelectionSifter/schema/log.sql
@@ -2,6 +2,9 @@
33 -- Replace /*$wgDBTableOptions*/ with the correct options
44
55 CREATE TABLE IF NOT EXISTS /*_*/assessment_changelog (
 6+ l_id int not null auto_increment,
 7+ -- id, for pagination
 8+
69 l_project varchar(63) not null,
710 -- project name
811
@@ -28,7 +31,8 @@
2932 -- a wiki-format timestamp
3033
3134 primary key (l_project, l_namespace, l_article, l_action, l_timestamp),
32 - key (l_article, l_namespace)
 35+ key (l_article, l_namespace),
 36+ unique key (l_id)
3337 ) /*$wgDBTableOptions*/;
3438
3539 CREATE INDEX /*i*/l_project ON /*_*/assessment_changelog (l_project);
Index: trunk/extensions/SelectionSifter/schema/project_stats.sql
@@ -2,6 +2,8 @@
33 -- Replace /*$wgDBTableOptions*/ with the correct options
44
55 CREATE TABLE IF NOT EXISTS /*_*/project_stats (
 6+ ps_id int not null auto_increment,
 7+ -- id, for pagination
68
79 ps_project varchar(63) not null,
810 -- project name
@@ -43,7 +45,9 @@
4446 ps_icount int unsigned default 0,
4547 -- how many pages have importance assessments in the project
4648
47 - primary key (ps_project, ps_quality)
 49+ primary key (ps_project, ps_quality),
 50+ key (ps_id)
4851 ) /*$wgDBTableOptions*/;
4952
 53+CREATE UNIQUE INDEX /*i*/ps_id ON /*_*/project_stats (ps_id);
5054 CREATE INDEX /*i*/ps_project ON /*_*/project_stats (ps_project);
Index: trunk/extensions/SelectionSifter/schema/ratings.sql
@@ -2,6 +2,9 @@
33 -- Replace /*$wgDBTableOptions*/ with the correct options
44
55 CREATE TABLE IF NOT EXISTS /*_*/ratings (
 6+ r_id int not null auto_increment,
 7+ -- id, for pagination
 8+
69 r_project varchar(63) not null,
710 -- project name
811
@@ -26,8 +29,10 @@
2730 -- time when importance rating was assigned
2831 -- a wiki-style timestamp
2932
30 - primary key (r_project, r_namespace, r_article)
 33+ primary key (r_project, r_namespace, r_article),
 34+ key (r_id)
3135 ) /*$wgDBTableOptions*/;
3236
 37+CREATE UNIQUE INDEX /*i*/r_id ON /*_*/ratings (r_id);
3338 CREATE INDEX /*i*/r_article ON /*_*/ratings (r_namespace, r_article);
3439 CREATE INDEX /*i*/r_project ON /*_*/ratings (r_project);
Index: trunk/extensions/SelectionSifter/schema/selections.sql
@@ -2,6 +2,9 @@
33 -- Replace /*$wgDBTableOptions*/ with the correct options
44
55 CREATE TABLE IF NOT EXISTS /*_*/selections (
 6+ s_id int not null auto_increment,
 7+ -- id, for pagination
 8+
69 s_selection_name varchar(63) not null,
710 -- project name
811
@@ -17,7 +20,8 @@
1821 s_revision int unsigned,
1922 -- manually set revision
2023
21 - primary key (s_selection_name, s_namespace, s_article)
 24+ primary key (s_selection_name, s_namespace, s_article),
 25+ unique key (s_id)
2226 ) /*$wgDBTableOptions*/;
2327
2428 CREATE INDEX /*i*/s_selection_name ON /*_*/selections (s_selection_name);

Status & tagging log