oms/backend/database/migrations/20260915000900-drop-remark-from-order-deliveries.js
liufumingren 11e7b26ced feat(backend): 发货单模块与 WMS 定时推送队列
- 发货单主表/明细表(order_deliveries / order_delivery_items)控制器与模型
- 表头金额与明细派生字段重算(utils/recalcOrderDelivery.js)
- 状态流转:审核/驳回/取消/恢复/作废、批量审核、批量切换仓库
- 审核入队 + 定时推送:service/orderDeliveryPush.js(乐观锁 CAS 防重、失败重试上限 3 次、业务失败退回待审核)+ schedule/orderDeliveryPush.js
- 收件人 AI 智能识别(service/ai.js,DeepSeek)
- 相关迁移:建表、站内字段、明细表、订单类型默认值、快递字典、菜单种子、历史数据搬迁
2026-09-13 02:23:47 +08:00

28 lines
941 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'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)',
});
}
},
};