mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
33 lines
1.7 KiB
JavaScript
33 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
// Reverts the notification_templates feature (20260703000008 +
|
|
// 20260709000004) — admin-editable notification wording has been moved back
|
|
// to hardcoded build() functions in data/notifications.data.js.
|
|
|
|
module.exports = {
|
|
async up(queryInterface) {
|
|
await queryInterface.dropTable('notification_templates');
|
|
await queryInterface.sequelize.query(`DROP TYPE IF EXISTS "enum_notification_templates_scope";`);
|
|
await queryInterface.sequelize.query(`DROP TYPE IF EXISTS "enum_notification_templates_status";`);
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.createTable('notification_templates', {
|
|
notification_template_id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true },
|
|
type: { type: Sequelize.STRING(100), allowNull: false, unique: true },
|
|
notify_type: { type: Sequelize.STRING(64), allowNull: false },
|
|
scope: { type: Sequelize.ENUM('admin', 'user', 'both'), allowNull: false },
|
|
label: { type: Sequelize.STRING(150), allowNull: false },
|
|
status: { type: Sequelize.ENUM('draft', 'sent'), allowNull: false, defaultValue: 'draft' },
|
|
title: { type: Sequelize.STRING(255), allowNull: true },
|
|
message: { type: Sequelize.TEXT, allowNull: true },
|
|
draft_title: { type: Sequelize.STRING(255), allowNull: true },
|
|
draft_message: { type: Sequelize.TEXT, allowNull: true },
|
|
last_sent_at: { type: Sequelize.DATE, allowNull: true },
|
|
is_system: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false },
|
|
createdAt: { type: Sequelize.DATE, allowNull: false },
|
|
updatedAt: { type: Sequelize.DATE, allowNull: false },
|
|
});
|
|
},
|
|
};
|