web/migrations/21000101000008-article-add-hide-column.js
module.exports = {
up: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async transaction => {
const DataTypes = Sequelize.DataTypes
await queryInterface.addColumn('Article', 'list',
{
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true,
},
{ transaction },
)
}),
down: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async transaction => {
await queryInterface.removeColumn('Article', 'list', { transaction })
}),
};