mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
25 lines
837 B
JavaScript
25 lines
837 B
JavaScript
'use strict';
|
|
|
|
// The order_index/is_required linear sequencing lock (added in
|
|
// 20260709000005-add-order-index-and-is-required-to-tasks) is redundant now
|
|
// that tasks have an explicit prerequisite graph (task_prerequisites, added
|
|
// in 20260717000001-create-task-prerequisites). Locking a task is now purely
|
|
// a function of its task_prerequisites rows — a task with none is never
|
|
// implicitly locked by its position in the list. order_index is kept as a
|
|
// display-order-only column.
|
|
|
|
module.exports = {
|
|
async up(queryInterface) {
|
|
await queryInterface.removeColumn('tasks', 'is_required');
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.addColumn('tasks', 'is_required', {
|
|
type: Sequelize.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true,
|
|
after: 'order_index',
|
|
});
|
|
},
|
|
};
|