Add migration to fix subtasκ  ordering (#554)

* Add migration to fix subtasκ  ordering

* Fix test issues
This commit is contained in:
Chris 2025-11-17 12:09:31 +02:00 committed by GitHub
parent 1008130e2c
commit 61ef6d7ac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 123 additions and 23 deletions

View file

@ -139,6 +139,11 @@ module.exports = (sequelize) => {
key: 'id',
},
},
order: {
type: DataTypes.INTEGER,
allowNull: true,
comment: 'Order position for subtasks within a parent task',
},
completed_at: {
type: DataTypes.DATE,
allowNull: true,
@ -162,6 +167,10 @@ module.exports = (sequelize) => {
{
fields: ['parent_task_id'],
},
{
name: 'tasks_parent_task_id_order',
fields: ['parent_task_id', 'order'],
},
],
}
);