r98706 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98705‎ | r98706 | r98707 >
Date:19:49, 2 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added 2 indexes, more to come later
Modified paths:
  • /trunk/extensions/Contest/Contest.hooks.php (modified) (history)
  • /trunk/extensions/Contest/Contest.sql (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSubmission.php (modified) (history)
  • /trunk/extensions/Contest/sql/IndexContestName.sql (added) (history)
  • /trunk/extensions/Contest/sql/IndexContestantUserContest.sql (added) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.hooks.php
@@ -59,6 +59,22 @@
6060 dirname( __FILE__ ) . '/Contest.sql',
6161 true
6262 ) );
 63+
 64+ $updater->addExtensionUpdate( array(
 65+ 'addIndex',
 66+ 'contests',
 67+ 'contest_name',
 68+ dirname( __FILE__ ) . '/sql/IndexContestName.sql',
 69+ true
 70+ ) );
 71+
 72+ $updater->addExtensionUpdate( array(
 73+ 'addIndex',
 74+ 'contest_contestants',
 75+ 'contestant_user_contest',
 76+ dirname( __FILE__ ) . '/sql/IndexContestantUserContest.sql',
 77+ true
 78+ ) );
6379
6480 return true;
6581 }
Index: trunk/extensions/Contest/sql/IndexContestName.sql
@@ -0,0 +1 @@
 2+CREATE UNIQUE INDEX /*i*/contest_name ON /*_*/contests (contest_name);
\ No newline at end of file
Property changes on: trunk/extensions/Contest/sql/IndexContestName.sql
___________________________________________________________________
Added: svn:eol-style
13 + native
Index: trunk/extensions/Contest/sql/IndexContestantUserContest.sql
@@ -0,0 +1 @@
 2+CREATE UNIQUE INDEX /*i*/contestant_user_contest ON /*_*/contest_contestants (contestant_contest_id, contestant_user_id);
\ No newline at end of file
Property changes on: trunk/extensions/Contest/sql/IndexContestantUserContest.sql
___________________________________________________________________
Added: svn:eol-style
13 + native
Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php
@@ -68,7 +68,7 @@
6969 $this->handleEnabledPage( $contest );
7070 break;
7171 case Contest::STATUS_DRAFT:
72 - // TODO
 72+ // TODO
7373 break;
7474 case Contest::STATUS_FINISHED:
7575 $this->showWarning( 'contest-submission-finished' );
Index: trunk/extensions/Contest/Contest.sql
@@ -17,8 +17,8 @@
1818 CREATE TABLE IF NOT EXISTS /*_*/contest_contestants (
1919 contestant_id INT unsigned NOT NULL auto_increment PRIMARY KEY, -- Contestant id (unique id per user per contest)
2020 contestant_contest_id SMALLINT unsigned NOT NULL, -- Foreign key on contests.contest_id
 21+ contestant_user_id INT(10) unsigned NOT NULL, -- Foreign key on user.user_id
2122 contestant_challange_id INT unsigned NOT NULL, -- Foreign key on contest_challanges.challange_id
22 - contestant_user_id INT(10) unsigned NOT NULL, -- Foreign key on user.user_id
2323
2424 -- These fields will be copied from the user table on contest lock
2525 contestant_full_name VARCHAR(255) NOT NULL, -- Full name of the contestant

Status & tagging log