WMS_MAIN/database/migrations/20260713150000-set-auto-increment-wms-order-delivery-1000028.js

19 lines
559 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';
module.exports = {
async up(queryInterface) {
// 紧急修复:将 wms_order_delivery_1000028 自增值提升至 15000+
// 原因:表重建后 AUTO_INCREMENT 被重置为 151,与历史水位差距过大
await queryInterface.sequelize.query(
'ALTER TABLE wms_order_delivery_1000028 AUTO_INCREMENT = 15000'
);
},
async down(queryInterface) {
// 回滚:重置为默认(MAX(id)+1)
await queryInterface.sequelize.query(
'ALTER TABLE wms_order_delivery_1000028 AUTO_INCREMENT = 1'
);
},
};