Index: trunk/extensions/Contest/Contest.hooks.php |
— | — | @@ -59,6 +59,22 @@ |
60 | 60 | dirname( __FILE__ ) . '/Contest.sql', |
61 | 61 | true |
62 | 62 | ) ); |
| 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 | + ) ); |
63 | 79 | |
64 | 80 | return true; |
65 | 81 | } |
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 |
1 | 3 | + 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 |
1 | 3 | + native |
Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | $this->handleEnabledPage( $contest ); |
70 | 70 | break; |
71 | 71 | case Contest::STATUS_DRAFT: |
72 | | - // TODO |
| 72 | + // TODO |
73 | 73 | break; |
74 | 74 | case Contest::STATUS_FINISHED: |
75 | 75 | $this->showWarning( 'contest-submission-finished' ); |
Index: trunk/extensions/Contest/Contest.sql |
— | — | @@ -17,8 +17,8 @@ |
18 | 18 | CREATE TABLE IF NOT EXISTS /*_*/contest_contestants ( |
19 | 19 | contestant_id INT unsigned NOT NULL auto_increment PRIMARY KEY, -- Contestant id (unique id per user per contest) |
20 | 20 | 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 |
21 | 22 | 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 |
23 | 23 | |
24 | 24 | -- These fields will be copied from the user table on contest lock |
25 | 25 | contestant_full_name VARCHAR(255) NOT NULL, -- Full name of the contestant |