Skip to content

Commit 5921f0e

Browse files
authored
chore: add migration that backfills scim user email hashes (#9295)
1 parent 17e9350 commit 5921f0e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
exports.up = (db, cb) => {
2+
db.runSql(`
3+
UPDATE users
4+
SET email_hash = md5(email::text)
5+
WHERE scim_id IS NOT NULL;
6+
`, cb);
7+
8+
};
9+
10+
exports.down = (db, cb) => {
11+
cb();
12+
};
13+
14+

0 commit comments

Comments
 (0)