From 8005e8a64177712aa2822aa79d3af57fed276c0e Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Wed, 11 Jan 2023 09:50:24 +0700 Subject: [PATCH] Truncated suppressions table We have been adding emails to the suppressions table which are not on the suppression list in Mailgun due to a misunderstanding of how Mailgun handles 5xx error codes. --- .../5.29/2023-01-11-02-45-truncate-suppressions.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ghost/core/core/server/data/migrations/versions/5.29/2023-01-11-02-45-truncate-suppressions.js diff --git a/ghost/core/core/server/data/migrations/versions/5.29/2023-01-11-02-45-truncate-suppressions.js b/ghost/core/core/server/data/migrations/versions/5.29/2023-01-11-02-45-truncate-suppressions.js new file mode 100644 index 0000000000..76879428dd --- /dev/null +++ b/ghost/core/core/server/data/migrations/versions/5.29/2023-01-11-02-45-truncate-suppressions.js @@ -0,0 +1,12 @@ +const logging = require('@tryghost/logging'); +const {createNonTransactionalMigration} = require('../../utils'); + +module.exports = createNonTransactionalMigration( + async function up(knex) { + logging.info('Clearing suppressions table'); + await knex('suppressions').truncate(); + }, + async function down() { + logging.info('Not doing anything - table has been truncated'); + } +);