Fix tournaments script

This commit is contained in:
Kalle
2024-01-30 17:09:41 +02:00
parent 144da5d158
commit 422f3227b6
2 changed files with 12 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
"season-initial-powers": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/season-initial-powers.ts",
"map-popularity": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/map-popularity.ts",
"map-popularity-q": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/map-popularity-q.ts",
"fix-tournaments": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/fix-tournaments.ts",
"transfer-weapon-pools": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/transfer-weapon-pools.ts",
"reopen-tournament": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/reopen-tournament.ts",
"refresh-prod-db": "node --experimental-specifier-resolution=node -r @swc-node/register -r tsconfig-paths/register scripts/refresh-prod-db.ts && npm run migrate up",

View File

@@ -0,0 +1,11 @@
/* eslint-disable no-console */
import "dotenv/config";
import { sql } from "~/db/sql";
sql
.prepare(
`update "TournamentStage" set "name" = 'Main bracket' where "name" = 'Elimination stage'`,
)
.run();
console.log(`Fixed tournaments`);