'use strict'; const TABLE_NAME = 'wms_store_express_binding_policy'; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.removeColumn(TABLE_NAME, 'match_condition'); await queryInterface.addColumn(TABLE_NAME, 'provinces', { type: Sequelize.TEXT, allowNull: true, comment: '限定省份,逗号分隔,如"广东省,浙江省",NULL=不限制', after: 'is_enabled', }); await queryInterface.addColumn(TABLE_NAME, 'cities', { type: Sequelize.TEXT, allowNull: true, comment: '限定城市,逗号分隔,如"广州市,杭州市",NULL=不限制', after: 'provinces', }); }, down: async (queryInterface, Sequelize) => { await queryInterface.removeColumn(TABLE_NAME, 'cities'); await queryInterface.removeColumn(TABLE_NAME, 'provinces'); await queryInterface.addColumn(TABLE_NAME, 'match_condition', { type: Sequelize.JSON, allowNull: true, comment: '附加匹配条件(JSON)', }); }, };