- print_computer: 新增录制字段(is_recording/recording_size/remote_play_url/recording_directory/deleted_at) - print_stations: 新增 deleted_at 软删除 - 新增 printComputer service (systemMethods + systems) - order_print 重构: 商品信息从 picking 表直读,不再依赖 order_items - 8 条迁移: 录制→软删除→权限→目录
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
'use strict';
|
||
|
||
module.exports = {
|
||
/**
|
||
* 为打印电脑表新增录制相关字段。
|
||
* @param {import('sequelize').QueryInterface} queryInterface 查询接口
|
||
* @param {import('sequelize')} Sequelize Sequelize 实例
|
||
* @return {Promise<void>} 无返回值
|
||
*/
|
||
async up(queryInterface, Sequelize) {
|
||
await queryInterface.addColumn('wms_print_computer', 'recording_size_value', {
|
||
type: Sequelize.INTEGER.UNSIGNED,
|
||
allowNull: true,
|
||
defaultValue: null,
|
||
comment: '录制大小数值',
|
||
});
|
||
await queryInterface.addColumn('wms_print_computer', 'recording_size_unit', {
|
||
type: Sequelize.STRING(10),
|
||
allowNull: true,
|
||
defaultValue: null,
|
||
comment: '录制存储单位:KB/MB/GB/TB',
|
||
});
|
||
await queryInterface.addColumn('wms_print_computer', 'remote_play_url', {
|
||
type: Sequelize.STRING(500),
|
||
allowNull: true,
|
||
defaultValue: null,
|
||
comment: '远程播放地址',
|
||
});
|
||
},
|
||
|
||
/**
|
||
* 回滚删除录制相关字段。
|
||
* @param {import('sequelize').QueryInterface} queryInterface 查询接口
|
||
* @param {import('sequelize')} Sequelize Sequelize 实例
|
||
* @return {Promise<void>} 无返回值
|
||
*/
|
||
async down(queryInterface, Sequelize) {
|
||
await queryInterface.removeColumn('wms_print_computer', 'remote_play_url');
|
||
await queryInterface.removeColumn('wms_print_computer', 'recording_size_unit');
|
||
await queryInterface.removeColumn('wms_print_computer', 'recording_size_value');
|
||
},
|
||
};
|