mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-19 00:15:43 +01:00
chore: add migration that backfills scim user email hashes (#9295)
This commit is contained in:
parent
17e93509e9
commit
5921f0ea09
14
src/migrations/20250211114205-scim-email-hash-backfill.js
Normal file
14
src/migrations/20250211114205-scim-email-hash-backfill.js
Normal file
@ -0,0 +1,14 @@
|
||||
exports.up = (db, cb) => {
|
||||
db.runSql(`
|
||||
UPDATE users
|
||||
SET email_hash = md5(email::text)
|
||||
WHERE scim_id IS NOT NULL;
|
||||
`, cb);
|
||||
|
||||
};
|
||||
|
||||
exports.down = (db, cb) => {
|
||||
cb();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user