WMS_MAIN/database/migrations/20260922160000-add-template-id-to-wms-wechat-app.js

25 lines
666 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
/**
* wms_wechat_app 增加「当前上传的代码模板ID」字段 template_id。
*
* 用于记录第三方平台代开发小程序最近一次 wxa/commit 上传代码使用的模板 ID。
*/
const TABLE_NAME = 'wms_wechat_app';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.addColumn(TABLE_NAME, 'template_id', {
type: Sequelize.BIGINT(20).UNSIGNED,
allowNull: true,
defaultValue: null,
comment: '当前上传的代码模板ID(wxa/commit 成功后记录)',
});
},
async down(queryInterface) {
await queryInterface.removeColumn(TABLE_NAME, 'template_id');
},
};