|
@@ -0,0 +1,21 @@
|
|
|
+'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, // 根据需要设置是否允许为空
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ async down (queryInterface, Sequelize) {
|
|
|
+ await queryInterface.removeColumn('Articles', 'type');
|
|
|
+ await queryInterface.removeColumn('Articles', 'img');
|
|
|
+ }
|
|
|
+};
|