Files
yourpart3/backend/migrations-active/20260928000000-fix-bisaya-generic-sentence-chain-prompt.cjs
Torsten Schulz (local) 314bf2ca3b
Some checks failed
Deploy to production / deploy (push) Failing after 54s
feat(bisaya): update sentence-chain prompt for clarity in grammar exercises
2026-09-28 15:57:58 +02:00

26 lines
857 B
JavaScript

'use strict';
/**
* The automatic sentence-chain generator used one fixed directions-question
* prompt for every multi-part cue. It therefore contradicted the word cards
* in unrelated lessons such as "Spielen & Freizeit".
*/
module.exports = {
async up(queryInterface) {
await queryInterface.sequelize.query(`
UPDATE community.vocab_grammar_exercise
SET question_data = jsonb_set(
question_data,
'{question}',
'"Ordne die Wortkarten zu den kurzen Formulierungen aus der Aufgabe."'::jsonb
)
WHERE question_data->>'type' = 'sentence_building'
AND question_data->>'question' = 'Ordne die Wortkarten als drei Fragen: Wohin geht die Person? Wann geht sie los? Mit wem ist sie unterwegs?';
`);
},
async down() {
// The previous prompt was incorrect and must not be restored.
}
};