From 4564c979278ecc1ee1931bc95d6b661de37bb581 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 16 Jan 2024 11:15:29 +0530 Subject: [PATCH] chore: remove system user's email in db. (#5849) Updates it from 'system@getunleash.io' to `null`. We don't have that address registered (and probably don't want it), so we'll leave it empty. This is a companion PR to https://github.com/Unleash/unleash/pull/5893. With both of those merged, the system user in the DB should match the one defined in `core.ts` --- .../20240111075911-update-system-user-email.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/migrations/20240111075911-update-system-user-email.js diff --git a/src/migrations/20240111075911-update-system-user-email.js b/src/migrations/20240111075911-update-system-user-email.js new file mode 100644 index 0000000000..f1ca2e9cc7 --- /dev/null +++ b/src/migrations/20240111075911-update-system-user-email.js @@ -0,0 +1,15 @@ +'use strict'; + +exports.up = function (db, callback) { + db.runSql( + `UPDATE users SET email = NULL WHERE id = -1337;`, + callback, + ); +}; + +exports.down = function (db, callback) { + db.runSql( + `UPDATE users SET email = 'system@getunleash.io' WHERE id = -1337;`, + callback, + ); +};