mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
updated db migration
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.createTable('task_lists', {
|
||||
task_list_id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true },
|
||||
name: { type: Sequelize.STRING, allowNull: false },
|
||||
description: { type: Sequelize.TEXT, allowNull: true },
|
||||
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 },
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.dropTable('task_lists');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user