Files
competition-website/database/migrations/019-add-title-to-carousel.js

17 lines
409 B
JavaScript
Raw Normal View History

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('carousel', 'title', {
type: Sequelize.STRING(200),
allowNull: true,
defaultValue: null,
comment: '轮播图标题',
after: 'image_url',
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.removeColumn('carousel', 'title');
},
};