'use strict'; module.exports = { async up(queryInterface, Sequelize) { await queryInterface.changeColumn('wms_platfrom_setting', 'warehouse_id', { type: Sequelize.BIGINT.UNSIGNED, allowNull: true, comment: '仓库ID,NULL表示系统级设置', }); }, async down(queryInterface, Sequelize) { // 回滚前需确认没有 warehouse_id=NULL 的数据,否则回滚会失败 await queryInterface.changeColumn('wms_platfrom_setting', 'warehouse_id', { type: Sequelize.BIGINT.UNSIGNED, allowNull: false, comment: '仓库ID', }); }, };