Revert "Add idify lfg match stages script"

This reverts commit a514617427.
This commit is contained in:
Kalle
2022-03-17 18:03:58 +02:00
parent a514617427
commit 3dd3e37d7c
2 changed files with 1 additions and 38 deletions

View File

@@ -1,36 +0,0 @@
import { PrismaClient } from "@prisma/client";
import { v4 as uuidv4 } from "uuid";
const prisma = new PrismaClient();
async function main() {
const stages = await prisma.lfgGroupMatchStage.findMany({
where: {
id: null,
},
});
console.log("in total: ", stages.length);
let count = 1;
for (const stage of stages) {
await prisma.lfgGroupMatchStage.update({
where: {
lfgGroupMatchId_order: {
lfgGroupMatchId: stage.lfgGroupMatchId,
order: stage.order,
},
},
data: {
id: uuidv4(),
},
});
console.log(count);
count++;
}
}
main()
// eslint-disable-next-line no-console
.then(() => console.log("done"))
.catch((e) => console.error(e));