'use strict';

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

  async down (queryInterface, Sequelize) {
    await queryInterface.removeColumn('articles', 'topPosition');
  }
};
