@ -16,7 +16,7 @@ use Doctrine\ORM\Mapping as ORM;
* @ORM\Index(name="exe_id", columns={"exe_id"}),
* @ORM\Index(name="user_id", columns={"user_id"}),
* @ORM\Index(name="question_id", columns={"question_id"}),
* @ORM\Index(name="session_id", columns={"session_id"})
* @ORM\Index(name="idx_track_e_attempt_tms", columns={"tms"}),
* }
* )
* @ORM\Entity
@ -803,6 +803,11 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE usergroup ADD author_id INT DEFAULT NULL');
}
$table = $schema->getTable('track_e_attempt');
if (!$table->hasIndex('idx_track_e_attempt_tms')) {
$this->addSql('CREATE INDEX idx_track_e_attempt_tms ON track_e_attempt (tms)');
$this->addSql('ALTER TABLE c_group_info ADD CONSTRAINT FK_CE06532491D79BD3 FOREIGN KEY (c_id) REFERENCES course (id);');
$this->addSql('ALTER TABLE course_category CHANGE auth_course_child auth_course_child VARCHAR(40) DEFAULT NULL');