mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-18 05:55:43 +00:00
Remove double transaction
This commit is contained in:
@@ -13,7 +13,6 @@ export default async function migration() {
|
|||||||
console.log("Running setup script 1.0.0-beta.9...");
|
console.log("Running setup script 1.0.0-beta.9...");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await db.transaction(async (trx) => {
|
|
||||||
await db.transaction(async (trx) => {
|
await db.transaction(async (trx) => {
|
||||||
trx.run(sql`UPDATE ${users} SET email = LOWER(email);`);
|
trx.run(sql`UPDATE ${users} SET email = LOWER(email);`);
|
||||||
trx.run(
|
trx.run(
|
||||||
@@ -23,12 +22,9 @@ export default async function migration() {
|
|||||||
sql`UPDATE ${passwordResetTokens} SET email = LOWER(email);`
|
sql`UPDATE ${passwordResetTokens} SET email = LOWER(email);`
|
||||||
);
|
);
|
||||||
trx.run(sql`UPDATE ${userInvites} SET email = LOWER(email);`);
|
trx.run(sql`UPDATE ${userInvites} SET email = LOWER(email);`);
|
||||||
trx.run(
|
trx.run(sql`UPDATE ${resourceWhitelist} SET email = LOWER(email);`);
|
||||||
sql`UPDATE ${resourceWhitelist} SET email = LOWER(email);`
|
|
||||||
);
|
|
||||||
trx.run(sql`UPDATE ${resourceOtp} SET email = LOWER(email);`);
|
trx.run(sql`UPDATE ${resourceOtp} SET email = LOWER(email);`);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(
|
console.log(
|
||||||
"We were unable to make all emails lower case in the database."
|
"We were unable to make all emails lower case in the database."
|
||||||
|
|||||||
Reference in New Issue
Block a user