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