Merge branch 'dev' of https://github.com/fosrl/pangolin into dev

This commit is contained in:
Milo Schwartz 2025-01-25 13:23:46 -05:00
commit 641b65cfab
2 changed files with 53 additions and 33 deletions

View file

@ -14,20 +14,16 @@ export default async function migration() {
try {
await db.transaction(async (trx) => {
await db.transaction(async (trx) => {
trx.run(sql`UPDATE ${users} SET email = LOWER(email);`);
trx.run(
sql`UPDATE ${emailVerificationCodes} SET email = LOWER(email);`
);
trx.run(
sql`UPDATE ${passwordResetTokens} SET email = LOWER(email);`
);
trx.run(sql`UPDATE ${userInvites} SET email = LOWER(email);`);
trx.run(
sql`UPDATE ${resourceWhitelist} SET email = LOWER(email);`
);
trx.run(sql`UPDATE ${resourceOtp} SET email = LOWER(email);`);
});
trx.run(sql`UPDATE ${users} SET email = LOWER(email);`);
trx.run(
sql`UPDATE ${emailVerificationCodes} SET email = LOWER(email);`
);
trx.run(
sql`UPDATE ${passwordResetTokens} SET email = LOWER(email);`
);
trx.run(sql`UPDATE ${userInvites} SET email = LOWER(email);`);
trx.run(sql`UPDATE ${resourceWhitelist} SET email = LOWER(email);`);
trx.run(sql`UPDATE ${resourceOtp} SET email = LOWER(email);`);
});
} catch (error) {
console.log(