'use strict'; const TABLE_NAME = 'wms_pack_task'; module.exports = { up: async queryInterface => { // 包材/称重/异常已由 wms_order_express 表(按运单号维度)承载,删除冗余 await queryInterface.removeColumn(TABLE_NAME, 'package_material_id'); await queryInterface.removeColumn(TABLE_NAME, 'package_material_snapshot'); await queryInterface.removeColumn(TABLE_NAME, 'weighing_weight'); await queryInterface.removeColumn(TABLE_NAME, 'abnormal_reason'); }, down: async (queryInterface, Sequelize) => { await queryInterface.addColumn(TABLE_NAME, 'package_material_id', { type: Sequelize.BIGINT(20).UNSIGNED, allowNull: true, comment: '包材ID,关联 wms_package_material.id', }); await queryInterface.addColumn(TABLE_NAME, 'package_material_snapshot', { type: Sequelize.STRING(200), allowNull: true, comment: '包材快照(编码+名称)', }); await queryInterface.addColumn(TABLE_NAME, 'weighing_weight', { type: Sequelize.DECIMAL(10, 3), allowNull: true, comment: '打包称重(kg)', }); await queryInterface.addColumn(TABLE_NAME, 'abnormal_reason', { type: Sequelize.STRING(500), allowNull: true, comment: '异常原因', }); }, };