WMS_MAIN/database/migrations/20260808100000-add-delivery-code-store-index.js

15 lines
460 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, Sequelize) {
// Query 3 关联查询:delivery_order_code + store_id 联合索引(最高频缺失索引)
await queryInterface.addIndex('wms_order_express', [ 'delivery_order_code', 'store_id' ], {
name: 'idx_delivery_code_store',
});
},
async down(queryInterface, Sequelize) {
await queryInterface.removeIndex('wms_order_express', 'idx_delivery_code_store');
},
};