ming #1

Merged
liufumingren merged 558 commits from ming into main 2026-11-18 16:13:25 +08:00
2 changed files with 36 additions and 0 deletions
Showing only changes of commit 0ced089599 - Show all commits

View File

@ -282,6 +282,12 @@ module.exports = app => {
defaultValue: 'N',
comment: '是否紧急',
},
is_b2b: {
type: ENUM('Y', 'N'),
allowNull: true,
defaultValue: 'N',
comment: '是否B2B:Y是 N否',
},
invoice_flag: {
type: ENUM(...StatusEnum.INVOICE),
allowNull: true,

View File

@ -0,0 +1,30 @@
'use strict';
/**
* 订单基表 wms_order_delivery 增加 is_b2b 列(是否B2B,默认 N)。
*
* 分表(wms_order_delivery_%)列由 order_delivery_factory 惰性同步补齐
* (首次访问分表时 describeTable 比对 + 单条 ALTER,带自增水位保护),
* 本迁移只补基表列,保持基表与分表结构一致。
*/
const TABLE_NAME = 'wms_order_delivery';
const COLUMN_NAME = 'is_b2b';
module.exports = {
// eslint-disable-next-line no-unused-vars
async up(queryInterface, Sequelize) {
const { ENUM } = Sequelize;
await queryInterface.addColumn(TABLE_NAME, COLUMN_NAME, {
type: ENUM('Y', 'N'),
allowNull: true,
defaultValue: 'N',
comment: '是否B2B:Y是 N否',
});
},
// eslint-disable-next-line no-unused-vars
async down(queryInterface, Sequelize) {
await queryInterface.removeColumn(TABLE_NAME, COLUMN_NAME);
},
};