chore: relocate backend into apps/api ahead of monorepo merge

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 12:20:40 +08:00
co-authored by Claude Sonnet 5
parent af44598df6
commit eaa6d2276a
388 changed files with 0 additions and 13998 deletions
@@ -0,0 +1,33 @@
'use strict';
// is_required (added 20260709000005) was later dropped by 20260720000001 —
// locking now comes purely from task_prerequisites, not linear position, so
// it's excluded here. order_index is display-order only.
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('tasks', {
task_id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true },
task_list_id: { type: Sequelize.UUID, allowNull: false, references: { model: 'task_lists', key: 'task_list_id' }, onDelete: 'CASCADE' },
name: { type: Sequelize.STRING, allowNull: false },
description: { type: Sequelize.TEXT, allowNull: true },
deadline: { type: Sequelize.DATE, allowNull: true },
order_index: { type: Sequelize.INTEGER, allowNull: false, defaultValue: 0 },
accepts_submissions: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: true },
status: { type: Sequelize.ENUM('pending', 'in_progress', 'completed', 'overdue'), defaultValue: 'pending', allowNull: false },
auto_marked_at: { type: Sequelize.DATE, allowNull: true, defaultValue: null },
createdBy: { type: Sequelize.INTEGER, allowNull: true },
updatedBy: { type: Sequelize.INTEGER, allowNull: true },
deletedBy: { type: Sequelize.INTEGER, allowNull: true },
createdAt: { type: Sequelize.DATE, allowNull: false },
updatedAt: { type: Sequelize.DATE, allowNull: false },
deletedAt: { type: Sequelize.DATE, allowNull: true },
});
await queryInterface.addIndex('tasks', ['task_list_id']);
await queryInterface.addIndex('tasks', ['status']);
},
async down(queryInterface) {
await queryInterface.dropTable('tasks');
},
};