Files
pp-tcms/backend/migrations/20240204090345-create-projects.js
2024-02-12 12:20:37 +09:00

33 lines
686 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('Projects', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
},
name: {
type: Sequelize.STRING,
allowNull: false,
},
detail: {
type: Sequelize.STRING,
allowNull: true,
},
createdAt: {
type: Sequelize.DATE,
allowNull: false,
},
updatedAt: {
type: Sequelize.DATE,
allowNull: false,
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('Projects');
},
};