'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.addColumn('Articles', 'isRecommended', {
      type: Sequelize.INTEGER,
      allowNull: true,
      defaultValue: 0,
      comment: '是否推荐：0-不推荐，1-推荐'
    });

    await queryInterface.addColumn('Articles', 'subtitle', {
      type: Sequelize.TEXT,
      allowNull: true,
      comment: '副标题'
    });
  },

  async down (queryInterface, Sequelize) {
    await queryInterface.removeColumn('Articles', 'isRecommended');
    await queryInterface.removeColumn('Articles', 'subtitle');
  }
};
