WMS_MAIN/database/migrations/20260702-add-lock-unlock-to-wms-storage-transaction.js
liufumingren 478ad2ab0d 1
2026-07-03 16:10:46 +08:00

29 lines
942 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';
/**
* 为 wms_storage_transaction.transaction_type ENUM 增加 LOCK / UNLOCK。
* LOCK:分配储位锁定
* UNLOCK:取消分配储位解锁
*/
module.exports = {
async up(queryInterface) {
const { sequelize } = queryInterface;
await sequelize.query(`
ALTER TABLE wms_storage_transaction
MODIFY COLUMN transaction_type ENUM(
'INBOUND', 'OUTBOUND', 'TRANSFER_OUT', 'TRANSFER_IN', 'LOCK', 'UNLOCK'
) NOT NULL COMMENT '交易类型:INBOUND入库 OUTBOUND出库 TRANSFER_OUT移出 TRANSFER_IN移入 LOCK分配储位锁定 UNLOCK取消分配储位解锁'
`);
},
async down(queryInterface) {
const { sequelize } = queryInterface;
await sequelize.query(`
ALTER TABLE wms_storage_transaction
MODIFY COLUMN transaction_type ENUM(
'INBOUND', 'OUTBOUND', 'TRANSFER_OUT', 'TRANSFER_IN'
) NOT NULL COMMENT '出入库类型'
`);
},
};