From 3dd3e37d7c2b3fa2fac4a36b7ac9920e90f2de5f Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 17 Mar 2022 18:03:58 +0200 Subject: [PATCH] Revert "Add idify lfg match stages script" This reverts commit a514617427fca67a5cf03949601a352dba1d46da. --- package.json | 3 +-- scripts/idifyLfgMatchStages.ts | 36 ---------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 scripts/idifyLfgMatchStages.ts diff --git a/package.json b/package.json index 4e24e709e..e79d89cf4 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,7 @@ "cy:run": "npx cypress run", "test:unit": "uvu -r tsm -r tsconfig-paths/register -i cypress", "tests": "npm run lint:styles && npm run lint:ts && npm run prettier:check && npm run typecheck && npm run test:unit", - "matches": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/matchesWithoutDetails.ts", - "idify": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/idifyLfgMatchStages.ts" + "matches": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/matchesWithoutDetails.ts" }, "dependencies": { "@dnd-kit/core": "^5.0.2", diff --git a/scripts/idifyLfgMatchStages.ts b/scripts/idifyLfgMatchStages.ts deleted file mode 100644 index f60a5526c..000000000 --- a/scripts/idifyLfgMatchStages.ts +++ /dev/null @@ -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));