WMS_MAIN/database/migrations/20260923120000-add-user-agreement-to-wms-wechat-app.js

25 lines
683 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 增加用户须知富文本字段(只做加字段):
* - user_agreement:用户须知(富文本 longText),供 wechat.getUserAgreementText/
* wechat.getUserAgreement/wechat.setUserAgreement 读写。
*/
const TABLE_NAME = 'wms_wechat_app';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.addColumn(TABLE_NAME, 'user_agreement', {
type: Sequelize.TEXT('long'),
allowNull: true,
defaultValue: null,
comment: '用户须知(富文本 longText)',
});
},
async down(queryInterface) {
await queryInterface.removeColumn(TABLE_NAME, 'user_agreement');
},
};