diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index e7fd01b58e..8fb2c0eabf 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/app/Migrations/Schema/V111/Version111.php @@ -263,6 +263,7 @@ class Version111 extends AbstractMigrationChamilo $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_allow_student_add', 'true', 'Yes'), ('ticket_allow_student_add', 'false', 'No')"); $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_allow_category_edition', 'true', 'Yes'), ('ticket_allow_category_edition', 'false', 'No')"); + $this->addSql("ALTER TABLE c_quiz_question_rel_category ADD INDEX idx_qqrc_qid (question_id)"); } } diff --git a/src/Chamilo/CourseBundle/Entity/CQuizQuestionRelCategory.php b/src/Chamilo/CourseBundle/Entity/CQuizQuestionRelCategory.php index 9196701434..70938737a3 100644 --- a/src/Chamilo/CourseBundle/Entity/CQuizQuestionRelCategory.php +++ b/src/Chamilo/CourseBundle/Entity/CQuizQuestionRelCategory.php @@ -11,7 +11,8 @@ use Doctrine\ORM\Mapping as ORM; * @ORM\Table( * name="c_quiz_question_rel_category", * indexes={ - * @ORM\Index(name="course", columns={"c_id"}) + * @ORM\Index(name="course", columns={"c_id"}), + * @ORM\Index(name="idx_qqrc_qid", columns={"question_id"}) * } * ) * @ORM\Entity