From 8b418bf84e91cd785a63898155fbc854f88538f7 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Thu, 11 Jan 2024 13:45:39 +0530 Subject: [PATCH] chore: set system user's email to systemuser@ in db This matches the email that is used by the system user defined in `core.ts`. This is the companion PR to https://github.com/Unleash/unleash/pull/5845. 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 000000000000..aa3ae8767bad --- /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 = 'systemuser@getunleash.io' WHERE id = -1337;`, + callback, + ); +}; + +exports.down = function (db, callback) { + db.runSql( + `UPDATE users SET email = 'system@getunleash.io' WHERE id = -1337;`, + callback, + ); +};