Skip to content

Commit

Permalink
Migration: Exercise: add in the migration to remove incoherent regist…
Browse files Browse the repository at this point in the history
…ry to avoid question to appear in quiz when it was not visible in C1 -refs BT#20895 GH #5411
  • Loading branch information
NicoDucou committed Apr 22, 2024
1 parent 06d34ca commit edca592
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public function up(Schema $schema): void
}

$table = $schema->getTable('c_quiz_rel_question');
$this->addSql('DELETE FROM c_quiz_rel_question WHERE iid in (select cqrq.iid from c_quiz_rel_question cqrq inner join c_quiz cq on cq.id = cqrq.exercice_id inner join c_quiz_question cqq on cqq.iid = cqrq.question_id and cqrq.c_id != cq.c_id)');
if ($table->hasColumn('exercice_id')) {
$this->addSql('DELETE FROM c_quiz_rel_question WHERE exercice_id = -1 ');
}
Expand Down

0 comments on commit edca592

Please sign in to comment.