mirror of
https://github.com/fosrl/pangolin.git
synced 2025-05-14 06:10:39 +01:00
Remove double transaction
This commit is contained in:
parent
6cc6b0c239
commit
d284d36c24
1 changed files with 10 additions and 14 deletions
|
@ -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."
|
||||||
|
|
Loading…
Reference in a new issue