From 07661b3f49cdbca748077be0e28ae278c3fd2469 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Tue, 7 Mar 2023 13:04:55 +0200 Subject: [PATCH] add notifications_retention setting Signed-off-by: andreas-unleash --- ...110038-add-setting-for-notification-retention.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/migrations/20230307110038-add-setting-for-notification-retention.js diff --git a/src/migrations/20230307110038-add-setting-for-notification-retention.js b/src/migrations/20230307110038-add-setting-for-notification-retention.js new file mode 100644 index 0000000000..57e1e147ff --- /dev/null +++ b/src/migrations/20230307110038-add-setting-for-notification-retention.js @@ -0,0 +1,13 @@ +exports.up = function (db, cb) { + db.runSql( + `INSERT INTO settings(name, content) VALUES ('notifications_retention', '{"hours": 720}')`, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + `DELETE FROM settings WHERE name = 'notifications_retention'`, + cb, + ); +};