query fix
This commit is contained in:
@@ -10,8 +10,7 @@ module.exports = {
|
||||
// while its multiple-choice data accepts only the first core pattern.
|
||||
await queryInterface.sequelize.query(`
|
||||
UPDATE community.vocab_grammar_exercise AS exercise
|
||||
SET question_data = JSONB_SET(exercise.question_data, '{question}', TO_JSONB(CAST(:repairedQuestion AS text))),
|
||||
updated_at = NOW()
|
||||
SET question_data = JSONB_SET(exercise.question_data, '{question}', TO_JSONB(CAST(:repairedQuestion AS text)))
|
||||
FROM community.vocab_course_lesson AS lesson
|
||||
WHERE exercise.lesson_id = lesson.id
|
||||
AND (lesson.id = 38 OR (lesson.course_id = 1 AND lesson.lesson_number = 38))
|
||||
@@ -26,8 +25,7 @@ module.exports = {
|
||||
// correct answers (83%) must therefore pass.
|
||||
await queryInterface.sequelize.query(`
|
||||
UPDATE community.vocab_course_lesson
|
||||
SET target_score_percent = 78,
|
||||
updated_at = NOW()
|
||||
SET target_score_percent = 78
|
||||
WHERE id = 38
|
||||
OR (course_id = 1 AND lesson_number = 38);
|
||||
`, { transaction });
|
||||
|
||||
Reference in New Issue
Block a user