WMS_MAIN/database/migrations/20260513090000-add-last-login-time-to-wms_print_computer.js
liufumingren 0c3518e65d 1
2026-05-13 03:18:39 +08:00

28 lines
896 B
JavaScript

'use strict';
module.exports = {
/**
* 为打印台电脑表新增上次登录时间字段。
* @param {import('sequelize').QueryInterface} queryInterface 查询接口
* @param {import('sequelize')} Sequelize Sequelize 实例
* @returns {Promise<void>} 无返回值
*/
async up(queryInterface, Sequelize) {
await queryInterface.addColumn('wms_print_computer', 'last_login_time', {
type: Sequelize.DATE,
allowNull: true,
comment: '上次登录时间',
});
},
/**
* 回滚删除打印台电脑表的上次登录时间字段。
* @param {import('sequelize').QueryInterface} queryInterface 查询接口
* @param {import('sequelize')} Sequelize Sequelize 实例
* @returns {Promise<void>} 无返回值
*/
async down(queryInterface, Sequelize) {
await queryInterface.removeColumn('wms_print_computer', 'last_login_time');
},
};