Index: trunk/extensions/Ratings/Ratings.hooks.php |
— | — | @@ -39,7 +39,21 @@ |
40 | 40 | 'votes_props', |
41 | 41 | dirname( __FILE__ ) . '/Ratings.sql', |
42 | 42 | true |
43 | | - ); |
| 43 | + ); |
| 44 | + |
| 45 | + $wgExtNewIndexes[] = array( |
| 46 | + 'votes', |
| 47 | + 'vote', |
| 48 | + dirname( __FILE__ ) . '/sql/Ratings_addVotesIndex.sql', |
| 49 | + true |
| 50 | + ); |
| 51 | + |
| 52 | + $wgExtNewIndexes[] = array( |
| 53 | + 'vote_props', |
| 54 | + 'prop_name', |
| 55 | + dirname( __FILE__ ) . '/sql/Ratings_addPropsIndex.sql', |
| 56 | + true |
| 57 | + ); |
44 | 58 | } |
45 | 59 | else { |
46 | 60 | $updater->addExtensionUpdate( array( |
— | — | @@ -53,7 +67,21 @@ |
54 | 68 | 'votes_props', |
55 | 69 | dirname( __FILE__ ) . '/Ratings.sql', |
56 | 70 | true |
57 | | - ) ); |
| 71 | + ) ); |
| 72 | + $updater->addExtensionUpdate( array( |
| 73 | + 'addIndex', |
| 74 | + 'votes', |
| 75 | + 'vote', |
| 76 | + dirname( __FILE__ ) . '/sql/Ratings_addVotesIndex.sql', |
| 77 | + true |
| 78 | + ) ); |
| 79 | + $updater->addExtensionUpdate( array( |
| 80 | + 'addIndex', |
| 81 | + 'vote_props', |
| 82 | + 'prop_name', |
| 83 | + dirname( __FILE__ ) . '/sql/Ratings_addPropsIndex.sql', |
| 84 | + true |
| 85 | + ) ); |
58 | 86 | } |
59 | 87 | } |
60 | 88 | |
Index: trunk/extensions/Ratings/sql/Ratings_addVotesIndex.sql |
— | — | @@ -0,0 +1 @@ |
| 2 | +CREATE UNIQUE INDEX vote ON /*$wgDBprefix*/votes (vote_user_text, vote_page_id, vote_prop_id); |
\ No newline at end of file |
Property changes on: trunk/extensions/Ratings/sql/Ratings_addVotesIndex.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: trunk/extensions/Ratings/sql/Ratings_addPropsIndex.sql |
— | — | @@ -0,0 +1 @@ |
| 2 | +CREATE UNIQUE INDEX prop_name ON /*$wgDBprefix*/vote_props (prop_name); |
\ No newline at end of file |
Property changes on: trunk/extensions/Ratings/sql/Ratings_addPropsIndex.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: trunk/extensions/Ratings/Ratings.sql |
— | — | @@ -10,12 +10,8 @@ |
11 | 11 | vote_time CHAR(14) binary NOT NULL default '' |
12 | 12 | ) /*$wgDBTableOptions*/; |
13 | 13 | |
14 | | -CREATE UNIQUE INDEX vote ON /*$wgDBprefix*/votes (vote_user_text, vote_page_id, vote_prop_id); |
15 | | - |
16 | 14 | -- Table to keep track of translation memories for the special words. |
17 | 15 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/vote_props ( |
18 | 16 | prop_id INT(5) unsigned NOT NULL auto_increment PRIMARY KEY, |
19 | 17 | prop_name VARCHAR(255) NOT NULL |
20 | | -) /*$wgDBTableOptions*/; |
21 | | - |
22 | | -CREATE UNIQUE INDEX prop_name ON /*$wgDBprefix*/vote_props (prop_name); |
\ No newline at end of file |
| 18 | +) /*$wgDBTableOptions*/; |
\ No newline at end of file |