123456789101112131415161718192021222324252627 |
- 'use strict';
- /** @type {import('sequelize-cli').Migration} */
- module.exports = {
- async up (queryInterface, Sequelize) {
- await queryInterface.addColumn('Articles', 'type', {
- type: Sequelize.INTEGER,
- allowNull: true, // 根据需要设置是否允许为空
- });
- await queryInterface.addColumn('Articles', 'img', {
- type: Sequelize.TEXT,
- allowNull: true, // 根据需要设置是否允许为空
- });
- await queryInterface.addColumn('Articles', 'cs', {
- type: Sequelize.TEXT,
- allowNull: true, // 根据需要设置是否允许为空
- });
- },
- async down (queryInterface, Sequelize) {
- await queryInterface.removeColumn('Articles', 'type');
- await queryInterface.removeColumn('Articles', 'img');
- await queryInterface.removeColumn('Articles', 'cs');
- }
- };
|