From ebb76a53547bfaa33ffee8e395a3b725a91cb5f4 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Wed, 27 Sep 2023 12:03:02 +0200 Subject: [PATCH] Feat/reset pnps (#4841) This PR resets pnps prompts by removing entries in the user_feedback table --- .../20230927071830-reset-pnps-feedback.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migrations/20230927071830-reset-pnps-feedback.js diff --git a/src/migrations/20230927071830-reset-pnps-feedback.js b/src/migrations/20230927071830-reset-pnps-feedback.js new file mode 100644 index 0000000000..d7243762df --- /dev/null +++ b/src/migrations/20230927071830-reset-pnps-feedback.js @@ -0,0 +1,14 @@ +'use strict'; + +exports.up = function (db, callback) { + db.runSql( + ` + DELETE FROM user_feedback WHERE feedback_id = 'pnps' AND given < NOW() - INTERVAL '3 months'; + `, + callback(), + ); +}; + +exports.down = function (db, callback) { + callback(); +};