mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
// The admin editor now authors in Markdown (converted client-side to the
|
||||
// HTML that subject/html_body already require) — these columns retain the
|
||||
// original Markdown purely so reopening a template for editing shows the
|
||||
// human-readable source again instead of the compiled HTML. Templates
|
||||
// created before this migration (all 8 system templates included) have
|
||||
// no Markdown source — html_body/draft_html_body remain hand-written HTML
|
||||
// for them, and the editor falls back to editing that directly.
|
||||
await queryInterface.addColumn('email_templates', 'body_markdown', {
|
||||
type: Sequelize.TEXT, allowNull: true,
|
||||
});
|
||||
await queryInterface.addColumn('email_templates', 'draft_body_markdown', {
|
||||
type: Sequelize.TEXT, allowNull: true,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.removeColumn('email_templates', 'draft_body_markdown');
|
||||
await queryInterface.removeColumn('email_templates', 'body_markdown');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user