From 780a3d92419381b292775992067ea85f5717a9ce Mon Sep 17 00:00:00 2001 From: les Date: Mon, 8 Mar 2021 21:07:32 +0100 Subject: [PATCH] fix status event_notification enum adding 'sending' --- server/api/models/eventnotification.js | 2 +- .../20210308194339-sending_notification_status.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 server/migrations/20210308194339-sending_notification_status.js diff --git a/server/api/models/eventnotification.js b/server/api/models/eventnotification.js index 279e7df3..d89f99eb 100644 --- a/server/api/models/eventnotification.js +++ b/server/api/models/eventnotification.js @@ -6,7 +6,7 @@ class EventNotification extends Model {} EventNotification.init({ status: { type: DataTypes.ENUM, - values: ['new', 'sent', 'error'], + values: ['new', 'sent', 'error', 'sending'], defaultValue: 'new', index: true } diff --git a/server/migrations/20210308194339-sending_notification_status.js b/server/migrations/20210308194339-sending_notification_status.js new file mode 100644 index 00000000..14e58948 --- /dev/null +++ b/server/migrations/20210308194339-sending_notification_status.js @@ -0,0 +1,10 @@ +'use strict' + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.sequelize.query('ALTER TYPE "enum_event_notifications_status" ADD VALUE \'sending\'') + }, + + down: (queryInterface, Sequelize) => { + } +}