'use strict'; /** * 从发货单表移除「备注」字段(order_deliveries.remark) * * 原因:手工单只需一个留言字段,统一写入 `seller_message`(奇门 sellerMessage/卖家留言), * 备注不再维护,故整列移除。历史搬迁数据中的原 orders.remark 不再回迁(原表保留可回溯)。 */ module.exports = { async up(queryInterface) { const cols = await queryInterface.describeTable('order_deliveries'); if (cols.remark) { await queryInterface.removeColumn('order_deliveries', 'remark'); } }, async down(queryInterface, Sequelize) { const cols = await queryInterface.describeTable('order_deliveries'); if (!cols.remark) { await queryInterface.addColumn('order_deliveries', 'remark', { type: Sequelize.STRING(500), allowNull: true, comment: '备注(已废弃:留言统一写 seller_message)', }); } }, };