WMS_MAIN/database/migrations/20260706-add-lock-to-wms-stock-transaction.js
2026-07-06 19:28:45 +08:00

28 lines
777 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_stock_transaction.transaction_type ENUM 增加 LOCK。
* LOCK:库存锁定流水(如分配订单锁定库存)。
*/
module.exports = {
async up(queryInterface) {
const { sequelize } = queryInterface;
await sequelize.query(`
ALTER TABLE wms_stock_transaction
MODIFY COLUMN transaction_type ENUM(
'INBOUND', 'OUTBOUND', 'LOCK'
) NOT NULL COMMENT '出入库类型:INBOUND入库 OUTBOUND出库 LOCK锁定'
`);
},
async down(queryInterface) {
const { sequelize } = queryInterface;
await sequelize.query(`
ALTER TABLE wms_stock_transaction
MODIFY COLUMN transaction_type ENUM(
'INBOUND', 'OUTBOUND'
) NOT NULL COMMENT '出入库类型'
`);
},
};