WMS_MAIN/database/migrations/20260715200000-remove-redundant-material-fields.js
liufumingren 5b3180ff34 feat(workbench): 新增工作台/打包台模块 (workbench/pack_task)
- 新增 model: workbench, pack_task, pack_task_packer

- 新增 systemMethods: workbench (finishPack/sendWeight/操作日志)

- systems/workbench 扩展: 波次订单ID获取、打包操作日志白名单

- 10 条迁移: 建表→扩展→权限→重构
2026-07-27 03:46:37 +08:00

37 lines
1.3 KiB
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';
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: '异常原因',
});
},
};