r85995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85994‎ | r85995 | r85996 >
Date:22:37, 13 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some fixes to setup sql
Modified paths:
  • /trunk/extensions/Ratings/Ratings.hooks.php (modified) (history)
  • /trunk/extensions/Ratings/Ratings.sql (modified) (history)
  • /trunk/extensions/Ratings/sql (added) (history)
  • /trunk/extensions/Ratings/sql/Ratings_addPropsIndex.sql (added) (history)
  • /trunk/extensions/Ratings/sql/Ratings_addVotesIndex.sql (added) (history)

Diff [purge]

Index: trunk/extensions/Ratings/Ratings.hooks.php
@@ -39,7 +39,21 @@
4040 'votes_props',
4141 dirname( __FILE__ ) . '/Ratings.sql',
4242 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+ );
4458 }
4559 else {
4660 $updater->addExtensionUpdate( array(
@@ -53,7 +67,21 @@
5468 'votes_props',
5569 dirname( __FILE__ ) . '/Ratings.sql',
5670 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+ ) );
5886 }
5987 }
6088
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
13 + 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
13 + native
Index: trunk/extensions/Ratings/Ratings.sql
@@ -10,12 +10,8 @@
1111 vote_time CHAR(14) binary NOT NULL default ''
1212 ) /*$wgDBTableOptions*/;
1313
14 -CREATE UNIQUE INDEX vote ON /*$wgDBprefix*/votes (vote_user_text, vote_page_id, vote_prop_id);
15 -
1614 -- Table to keep track of translation memories for the special words.
1715 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/vote_props (
1816 prop_id INT(5) unsigned NOT NULL auto_increment PRIMARY KEY,
1917 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

Status & tagging log