Remove double transaction

This commit is contained in:
Owen Schwartz
2025-01-25 12:55:19 -05:00
parent 6cc6b0c239
commit d284d36c24

View File

@@ -13,7 +13,6 @@ export default async function migration() {
console.log("Running setup script 1.0.0-beta.9...");
try {
await db.transaction(async (trx) => {
await db.transaction(async (trx) => {
trx.run(sql`UPDATE ${users} SET email = LOWER(email);`);
trx.run(
@@ -23,12 +22,9 @@ export default async function migration() {
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 ${resourceWhitelist} SET email = LOWER(email);`);
trx.run(sql`UPDATE ${resourceOtp} SET email = LOWER(email);`);
});
});
} catch (error) {
console.log(
"We were unable to make all emails lower case in the database."