diff --git a/src/migrations/20250211114205-scim-email-hash-backfill.js b/src/migrations/20250211114205-scim-email-hash-backfill.js new file mode 100644 index 0000000000..e1ae9ad0f7 --- /dev/null +++ b/src/migrations/20250211114205-scim-email-hash-backfill.js @@ -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(); + }; + + \ No newline at end of file