mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Revert "Add idify lfg match stages script"
This reverts commit a514617427.
This commit is contained in:
parent
a514617427
commit
3dd3e37d7c
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
Loading…
Reference in New Issue
Block a user