mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
perform test
test to courses Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
// quiz_attempts.started_at and quiz_attempts.status were added via raw SQL
|
||||
// during an earlier development session. The assessment_sessions table now owns
|
||||
// session lifecycle; quiz_attempts are always-graded completed records only.
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
const tableDesc = await queryInterface.describeTable('quiz_attempts');
|
||||
if (tableDesc.started_at) await queryInterface.removeColumn('quiz_attempts', 'started_at');
|
||||
if (tableDesc.status) await queryInterface.removeColumn('quiz_attempts', 'status');
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.addColumn('quiz_attempts', 'started_at', { type: Sequelize.DATE, allowNull: true });
|
||||
await queryInterface.addColumn('quiz_attempts', 'status', { type: Sequelize.STRING(20), allowNull: true });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user