Delete unused table
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle
2026-07-31 15:26:25 +03:00
parent ea6bb0eb43
commit 38279e46a0
16 changed files with 10 additions and 31 deletions

View File

@@ -644,19 +644,6 @@ export interface TournamentStage {
createdAt: Generated<number>;
}
/** Tournament sub post, shown in a list of subs available for teams to pick from. */
export interface TournamentSub {
bestWeapons: JSONColumnType<MainWeaponId[]>;
/** 0 = no, 1 = yes, 2 = listen only */
canVc: number;
createdAt: Generated<number>;
message: string | null;
okWeapons: JSONColumnTypeNullable<MainWeaponId[]>;
tournamentId: number;
userId: number;
visibility: "+1" | "+2" | "+3" | "ALL";
}
export interface TournamentLFGLike {
likerTeamId: number;
targetTeamId: number;
@@ -1279,7 +1266,6 @@ export interface DB {
TournamentResult: TournamentResult;
TournamentRound: TournamentRound;
TournamentStage: TournamentStage;
TournamentSub: TournamentSub;
TournamentTeam: TournamentTeam;
TournamentTeamCheckIn: TournamentTeamCheckIn;
TournamentTeamMember: TournamentTeamMember;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,7 @@
export function up(db) {
db.transaction(() => {
db.prepare(/* sql */ `drop table if exists "TournamentSub"`).run();
db.pragma("foreign_key_check");
})();
}

View File

@@ -674,9 +674,9 @@ export function buildCases(fx: Fixtures): {
);
add(
"TournamentLFGRepository.findAllSubsByTournamentId",
fx.subsTournamentId,
(tournamentId) =>
TournamentLFGRepository.findAllSubsByTournamentId(tournamentId),
fx.lfgTournament,
(lfg) =>
TournamentLFGRepository.findAllSubsByTournamentId(lfg.tournamentId),
);
// TournamentMatchRepository

View File

@@ -75,7 +75,6 @@ export interface Fixtures {
} | null;
lfgAuthorId: number | null;
lfgTournament: { tournamentId: number; teamId: number } | null;
subsTournamentId: number | null;
auditTournamentId: number | null;
xrank: {
userId: number;
@@ -154,7 +153,6 @@ export async function resolveFixtures(): Promise<Fixtures> {
heavyAssociation: await resolveHeavyAssociation(),
lfgAuthorId: await resolveLfgAuthorId(),
lfgTournament: await resolveLfgTournament(),
subsTournamentId: (await resolveSubsTournamentId()) ?? heavyTournamentId,
auditTournamentId: (await resolveAuditTournamentId()) ?? heavyTournamentId,
xrank: await resolveXRank(),
heavyArtUserId: await resolveHeavyArtUserId(),
@@ -934,18 +932,6 @@ async function resolveLfgTournament() {
return { tournamentId: row.tournamentId, teamId: row.id };
}
async function resolveSubsTournamentId() {
const row = await db
.selectFrom("TournamentSub")
.select(({ fn }) => ["tournamentId", fn.countAll<number>().as("count")])
.groupBy("tournamentId")
.orderBy("count", "desc")
.limit(1)
.executeTakeFirst();
return row?.tournamentId ?? null;
}
async function resolveAuditTournamentId() {
const row = await db
.selectFrom("TournamentAuditLog")