'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.addColumn('articles', 'sortOrder', {
      type: Sequelize.INTEGER,
      allowNull: true,
      defaultValue: 0,
      comment: '文章排序字段，用于置顶文章的排序'
    });
  },

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