Index: trunk/extensions/SelectionSifter/schema/log.sql |
— | — | @@ -2,6 +2,9 @@ |
3 | 3 | -- Replace /*$wgDBTableOptions*/ with the correct options |
4 | 4 | |
5 | 5 | CREATE TABLE IF NOT EXISTS /*_*/assessment_changelog ( |
| 6 | + l_id int not null auto_increment, |
| 7 | + -- id, for pagination |
| 8 | + |
6 | 9 | l_project varchar(63) not null, |
7 | 10 | -- project name |
8 | 11 | |
— | — | @@ -28,7 +31,8 @@ |
29 | 32 | -- a wiki-format timestamp |
30 | 33 | |
31 | 34 | 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) |
33 | 37 | ) /*$wgDBTableOptions*/; |
34 | 38 | |
35 | 39 | CREATE INDEX /*i*/l_project ON /*_*/assessment_changelog (l_project); |
Index: trunk/extensions/SelectionSifter/schema/project_stats.sql |
— | — | @@ -2,6 +2,8 @@ |
3 | 3 | -- Replace /*$wgDBTableOptions*/ with the correct options |
4 | 4 | |
5 | 5 | CREATE TABLE IF NOT EXISTS /*_*/project_stats ( |
| 6 | + ps_id int not null auto_increment, |
| 7 | + -- id, for pagination |
6 | 8 | |
7 | 9 | ps_project varchar(63) not null, |
8 | 10 | -- project name |
— | — | @@ -43,7 +45,9 @@ |
44 | 46 | ps_icount int unsigned default 0, |
45 | 47 | -- how many pages have importance assessments in the project |
46 | 48 | |
47 | | - primary key (ps_project, ps_quality) |
| 49 | + primary key (ps_project, ps_quality), |
| 50 | + key (ps_id) |
48 | 51 | ) /*$wgDBTableOptions*/; |
49 | 52 | |
| 53 | +CREATE UNIQUE INDEX /*i*/ps_id ON /*_*/project_stats (ps_id); |
50 | 54 | CREATE INDEX /*i*/ps_project ON /*_*/project_stats (ps_project); |
Index: trunk/extensions/SelectionSifter/schema/ratings.sql |
— | — | @@ -2,6 +2,9 @@ |
3 | 3 | -- Replace /*$wgDBTableOptions*/ with the correct options |
4 | 4 | |
5 | 5 | CREATE TABLE IF NOT EXISTS /*_*/ratings ( |
| 6 | + r_id int not null auto_increment, |
| 7 | + -- id, for pagination |
| 8 | + |
6 | 9 | r_project varchar(63) not null, |
7 | 10 | -- project name |
8 | 11 | |
— | — | @@ -26,8 +29,10 @@ |
27 | 30 | -- time when importance rating was assigned |
28 | 31 | -- a wiki-style timestamp |
29 | 32 | |
30 | | - primary key (r_project, r_namespace, r_article) |
| 33 | + primary key (r_project, r_namespace, r_article), |
| 34 | + key (r_id) |
31 | 35 | ) /*$wgDBTableOptions*/; |
32 | 36 | |
| 37 | +CREATE UNIQUE INDEX /*i*/r_id ON /*_*/ratings (r_id); |
33 | 38 | CREATE INDEX /*i*/r_article ON /*_*/ratings (r_namespace, r_article); |
34 | 39 | CREATE INDEX /*i*/r_project ON /*_*/ratings (r_project); |
Index: trunk/extensions/SelectionSifter/schema/selections.sql |
— | — | @@ -2,6 +2,9 @@ |
3 | 3 | -- Replace /*$wgDBTableOptions*/ with the correct options |
4 | 4 | |
5 | 5 | CREATE TABLE IF NOT EXISTS /*_*/selections ( |
| 6 | + s_id int not null auto_increment, |
| 7 | + -- id, for pagination |
| 8 | + |
6 | 9 | s_selection_name varchar(63) not null, |
7 | 10 | -- project name |
8 | 11 | |
— | — | @@ -17,7 +20,8 @@ |
18 | 21 | s_revision int unsigned, |
19 | 22 | -- manually set revision |
20 | 23 | |
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) |
22 | 26 | ) /*$wgDBTableOptions*/; |
23 | 27 | |
24 | 28 | CREATE INDEX /*i*/s_selection_name ON /*_*/selections (s_selection_name); |