mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-18 13:10:29 -05:00
17 lines
511 B
TypeScript
17 lines
511 B
TypeScript
/* eslint-disable no-console */
|
|
import "dotenv/config";
|
|
import { sql } from "~/db/sql";
|
|
|
|
const faultyTournamentTeamIds = sql
|
|
.prepare(
|
|
"select tournamentTeamId from mappoolmap where tournamentteamid is not null and mode = 'SZ' group by tournamentteamid"
|
|
)
|
|
.all()
|
|
.map((row) => row.tournamentTeamId);
|
|
|
|
for (const id of faultyTournamentTeamIds) {
|
|
sql.prepare("delete from mappoolmap where tournamentteamid = ?").run(id);
|
|
}
|
|
|
|
console.log(`Nuked the following: ${faultyTournamentTeamIds.join(", ")}`);
|