'use strict'; /** * 为 wms_order_express 表新增 delivery_order_code 和 source_order_codes 字段。 * * 用途:运单记录需要关联对应的发货单号和原始订单号,便于运单追溯和导出。 * 字段格式参考 wms_order_delivery 表的同名字段。 */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.addColumn('wms_order_express', 'delivery_order_code', { type: Sequelize.STRING(50), allowNull: true, comment: '发货单号', after: 'warehouse_id', }); await queryInterface.addColumn('wms_order_express', 'source_order_codes', { type: Sequelize.TEXT, allowNull: true, comment: '来源订单号集合', after: 'delivery_order_code', }); }, async down(queryInterface) { await queryInterface.removeColumn('wms_order_express', 'delivery_order_code'); await queryInterface.removeColumn('wms_order_express', 'source_order_codes'); }, };