'use strict'; const TABLE_NAME = 'wms_pack_task'; module.exports = { up: async queryInterface => { // 打包人信息已由 wms_pack_task_packer 子表承载,删除主表冗余字段 await queryInterface.removeColumn(TABLE_NAME, 'primary_packer_emp_id'); await queryInterface.removeColumn(TABLE_NAME, 'primary_packer_emp_no'); await queryInterface.removeColumn(TABLE_NAME, 'primary_packer_name'); await queryInterface.removeColumn(TABLE_NAME, 'packers_snapshot'); }, down: async (queryInterface, Sequelize) => { await queryInterface.addColumn(TABLE_NAME, 'primary_packer_emp_id', { type: Sequelize.INTEGER.UNSIGNED, allowNull: true, comment: '主打包人工号ID', }); await queryInterface.addColumn(TABLE_NAME, 'primary_packer_emp_no', { type: Sequelize.STRING(64), allowNull: true, comment: '主打包人工号', }); await queryInterface.addColumn(TABLE_NAME, 'primary_packer_name', { type: Sequelize.STRING(128), allowNull: true, comment: '主打包人姓名', }); await queryInterface.addColumn(TABLE_NAME, 'packers_snapshot', { type: Sequelize.JSON, allowNull: true, comment: '打包人快照:散单对象/团购数组', }); }, };